Update dependecies:

github.com/grpc-ecosystem/grpc-gateway v1.14.6 -> grpc-gateway v1.16.0
  golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e->v0.0.0-20210220033141-f8bda1e9f3ba
This commit is contained in:
Piotr Tabor
2021-03-27 20:48:33 +01:00
parent c49807f59e
commit f290ab2e60
14 changed files with 49 additions and 39 deletions

View File

@ -28,6 +28,7 @@ import (
"go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/tests/v3/integration"
"go.etcd.io/etcd/tests/v3/integration/clientv3"
"go.uber.org/zap/zaptest"
"google.golang.org/grpc"
)
@ -124,7 +125,7 @@ func testBalancerUnderNetworkPartition(t *testing.T, op func(*clientv3.Client, c
t.Fatal(err)
}
defer cli.Close()
cli = cli.WithLogger(zaptest.NewLogger(t).Named("client"))
// wait for eps[0] to be pinned
clientv3test.MustWaitPinReady(t, cli)
@ -136,6 +137,8 @@ func testBalancerUnderNetworkPartition(t *testing.T, op func(*clientv3.Client, c
for i := 0; i < 5; i++ {
ctx, cancel := context.WithTimeout(context.Background(), timeout)
err = op(cli, ctx)
t.Logf("Op returned error: %v", err)
t.Log("Cancelling...")
cancel()
if err == nil {
break