Skip to content
Snippets Groups Projects
Commit 833ca182 authored by fangyincheng's avatar fangyincheng
Browse files

Add:add travis

parent ebece398
No related branches found
No related tags found
No related merge requests found
language: go
go:
- "1.11"
- "1.12"
env:
- GO111MODULE=on
install: true
script:
- go fmt ./... && [[ -z `git status -s` ]]
- go mod vendor && go test ./... -coverprofile=coverage.txt -covermode=atomic
after_success:
- bash <(curl -s https://codecov.io/bash)
......@@ -8,5 +8,3 @@ import (
type LoadBalance interface {
Select([]protocol.Invoker, protocol.Invocation) protocol.Invoker
}
......@@ -31,7 +31,7 @@ func (lb *randomLoadBalance) Select(invokers []protocol.Invoker, invocation prot
sameWeight := true
weights := make([]int64, length)
firstWeight :=GetWeight(invokers[0], invocation)
firstWeight := GetWeight(invokers[0], invocation)
totalWeight := firstWeight
weights[0] = firstWeight
......
......@@ -37,7 +37,7 @@ func TestHTTPClient_Call(t *testing.T) {
// Export
proto := GetProtocol()
url, err := common.NewURL(context.Background(), "jsonrpc://127.0.0.1:20000/com.ikurento.user.UserProvider?anyhost=true&"+
url, err := common.NewURL(context.Background(), "jsonrpc://127.0.0.1:20001/com.ikurento.user.UserProvider?anyhost=true&"+
"application=BDTService&category=providers&default.timeout=10000&dubbo=dubbo-provider-golang-1.0.0&"+
"environment=dev&interface=com.ikurento.user.UserProvider&ip=192.168.56.1&methods=GetUser%2C&"+
"module=dubbogo+user-info+server&org=ikurento.com&owner=ZX&pid=1447&revision=0.0.1&"+
......
......@@ -24,7 +24,7 @@ func TestJsonrpcInvoker_Invoke(t *testing.T) {
// Export
proto := GetProtocol()
url, err := common.NewURL(context.Background(), "jsonrpc://127.0.0.1:20000/com.ikurento.user.UserProvider?anyhost=true&"+
url, err := common.NewURL(context.Background(), "jsonrpc://127.0.0.1:20001/com.ikurento.user.UserProvider?anyhost=true&"+
"application=BDTService&category=providers&default.timeout=10000&dubbo=dubbo-provider-golang-1.0.0&"+
"environment=dev&interface=com.ikurento.user.UserProvider&ip=192.168.56.1&methods=GetUser%2C&"+
"module=dubbogo+user-info+server&org=ikurento.com&owner=ZX&pid=1447&revision=0.0.1&"+
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment