Skip to content

Commit

Permalink
Merge pull request #10045 from gyuho/go-1.11
Browse files Browse the repository at this point in the history
*: use Go 1.11 for tests
  • Loading branch information
gyuho authored Aug 29, 2018
2 parents e52b861 + 839f202 commit 1a282a7
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 34 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sudo: required
services: docker

go:
- 1.10.3
- 1.11
- tip

notifications:
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down
5 changes: 4 additions & 1 deletion clientv3/integration/lease_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion clientv3/lease.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions etcdserver/api/v2http/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}

Expand Down
4 changes: 2 additions & 2 deletions etcdserver/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions functional/agent/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
Expand Down
4 changes: 2 additions & 2 deletions integration/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 6 additions & 6 deletions pkg/testutil/leak.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions proxy/httpproxy/reverse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down

0 comments on commit 1a282a7

Please sign in to comment.