diff --git a/.travis.yml b/.travis.yml index 85138136e7e..48547aa3a4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ sudo: required services: docker go: -- 1.10.3 +- 1.11 - tip notifications: @@ -30,13 +30,13 @@ env: matrix: fast_finish: true allow_failures: - - go: 1.10.3 + - go: 1.11 env: TARGET=linux-amd64-grpcproxy - - go: 1.10.3 + - go: 1.11 env: TARGET=linux-amd64-coverage - go: tip env: TARGET=linux-amd64-fmt-unit-go-tip - - go: 1.10.3 + - go: 1.11 env: TARGET=linux-386-unit exclude: - go: tip @@ -57,7 +57,7 @@ matrix: env: TARGET=linux-amd64-grpcproxy - go: tip env: TARGET=linux-amd64-coverage - - go: 1.10.3 + - go: 1.11 env: TARGET=linux-amd64-fmt-unit-go-tip - go: tip env: TARGET=linux-386-unit diff --git a/Makefile b/Makefile index eefab125d3f..a87aae3f086 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ docker-remove: -GO_VERSION ?= 1.10.3 +GO_VERSION ?= 1.11 ETCD_VERSION ?= $(shell git rev-parse --short HEAD || echo "GitNotFound") TEST_SUFFIX = $(shell date +%s | base64 | head -c 15) @@ -65,11 +65,11 @@ endif # Example: -# GO_VERSION=1.8.7 make build-docker-test +# GO_VERSION=1.10.3 make build-docker-test # make build-docker-test # # gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd-development.json)" https://gcr.io -# GO_VERSION=1.8.7 make push-docker-test +# GO_VERSION=1.10.3 make push-docker-test # make push-docker-test # # gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com diff --git a/clientv3/integration/lease_test.go b/clientv3/integration/lease_test.go index ff11f0f4730..699862baaa5 100644 --- a/clientv3/integration/lease_test.go +++ b/clientv3/integration/lease_test.go @@ -825,8 +825,11 @@ func TestLeaseWithRequireLeader(t *testing.T) { // kaReqLeader may issue multiple requests while waiting for the first // response from proxy server; drain any stray keepalive responses time.Sleep(100 * time.Millisecond) - for len(kaReqLeader) > 0 { + for { <-kaReqLeader + if len(kaReqLeader) == 0 { + break + } } select { diff --git a/clientv3/lease.go b/clientv3/lease.go index 6e92fa3baca..68a8ae6b3de 100644 --- a/clientv3/lease.go +++ b/clientv3/lease.go @@ -199,7 +199,7 @@ func NewLeaseFromLeaseClient(remote pb.LeaseClient, c *Client, keepAliveTimeout keepAlives: make(map[LeaseID]*keepAlive), remote: remote, firstKeepAliveTimeout: keepAliveTimeout, - lg: c.lg, + lg: c.lg, } if l.firstKeepAliveTimeout == time.Second { l.firstKeepAliveTimeout = defaultTTL diff --git a/etcdserver/api/v2http/client.go b/etcdserver/api/v2http/client.go index b0e01c98af9..3eabfc68634 100644 --- a/etcdserver/api/v2http/client.go +++ b/etcdserver/api/v2http/client.go @@ -76,12 +76,12 @@ func handleV2(lg *zap.Logger, mux *http.ServeMux, server etcdserver.ServerV2, ti } mh := &membersHandler{ - lg: lg, - sec: sec, - server: server, - cluster: server.Cluster(), - timeout: timeout, - clock: clockwork.NewRealClock(), + lg: lg, + sec: sec, + server: server, + cluster: server.Cluster(), + timeout: timeout, + clock: clockwork.NewRealClock(), clientCertAuthEnabled: server.ClientCertAuthEnabled(), } diff --git a/etcdserver/config_test.go b/etcdserver/config_test.go index aa9582bc27a..1d4157dc4cb 100644 --- a/etcdserver/config_test.go +++ b/etcdserver/config_test.go @@ -196,8 +196,8 @@ func TestWALDir(t *testing.T) { func TestShouldDiscover(t *testing.T) { tests := map[string]bool{ - "": false, - "foo": true, + "": false, + "foo": true, "http://discovery.etcd.io/asdf": true, } for durl, w := range tests { diff --git a/functional/agent/server.go b/functional/agent/server.go index 8bba6379253..a39f28e764c 100644 --- a/functional/agent/server.go +++ b/functional/agent/server.go @@ -64,10 +64,10 @@ func NewServer( address string, ) *Server { return &Server{ - lg: lg, - network: network, - address: address, - last: rpcpb.Operation_NOT_STARTED, + lg: lg, + network: network, + address: address, + last: rpcpb.Operation_NOT_STARTED, advertiseClientPortToProxy: make(map[int]proxy.Server), advertisePeerPortToProxy: make(map[int]proxy.Server), } diff --git a/integration/cluster.go b/integration/cluster.go index c1149de858c..bc6881126bf 100644 --- a/integration/cluster.go +++ b/integration/cluster.go @@ -291,8 +291,8 @@ func (c *cluster) mustNewMember(t *testing.T) *member { grpcKeepAliveTimeout: c.cfg.GRPCKeepAliveTimeout, clientMaxCallSendMsgSize: c.cfg.ClientMaxCallSendMsgSize, clientMaxCallRecvMsgSize: c.cfg.ClientMaxCallRecvMsgSize, - useIP: c.cfg.UseIP, - leaseCheckpointInterval: c.cfg.LeaseCheckpointInterval, + useIP: c.cfg.UseIP, + leaseCheckpointInterval: c.cfg.LeaseCheckpointInterval, }) m.DiscoveryURL = c.cfg.DiscoveryURL if c.cfg.UseGRPC { diff --git a/pkg/testutil/leak.go b/pkg/testutil/leak.go index 8a867b16357..27eaa36d232 100644 --- a/pkg/testutil/leak.go +++ b/pkg/testutil/leak.go @@ -70,13 +70,13 @@ func CheckAfterTest(d time.Duration) error { } var bad string badSubstring := map[string]string{ - ").writeLoop(": "a Transport", + ").writeLoop(": "a Transport", "created by net/http/httptest.(*Server).Start": "an httptest.Server", - "timeoutHandler": "a TimeoutHandler", - "net.(*netFD).connect(": "a timing out dial", - ").noteClientGone(": "a closenotifier sender", - ").readLoop(": "a Transport", - ".grpc": "a gRPC resource", + "timeoutHandler": "a TimeoutHandler", + "net.(*netFD).connect(": "a timing out dial", + ").noteClientGone(": "a closenotifier sender", + ").readLoop(": "a Transport", + ".grpc": "a gRPC resource", } var stacks string diff --git a/proxy/httpproxy/reverse_test.go b/proxy/httpproxy/reverse_test.go index 284b6811b17..47a3b4a5b6c 100644 --- a/proxy/httpproxy/reverse_test.go +++ b/proxy/httpproxy/reverse_test.go @@ -175,10 +175,10 @@ func TestRemoveSingleHopHeaders(t *testing.T) { "Keep-Alive": {"foo"}, "Proxy-Authenticate": {"Basic realm=example.com"}, "Proxy-Authorization": {"foo"}, - "Te": {"deflate,gzip"}, - "Trailers": {"ETag"}, - "Transfer-Encoding": {"chunked"}, - "Upgrade": {"WebSocket"}, + "Te": {"deflate,gzip"}, + "Trailers": {"ETag"}, + "Transfer-Encoding": {"chunked"}, + "Upgrade": {"WebSocket"}, // headers that should persist "Accept": {"application/json"},