From 6a8d6b6ad9e2f2263dcc323898bcb956ef089e4b Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Thu, 26 Oct 2017 15:12:27 -0700 Subject: [PATCH] clientv3/integration: use waitPinReady in blackhole test Signed-off-by: Gyu-Ho Lee --- clientv3/integration/black_hole_test.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/clientv3/integration/black_hole_test.go b/clientv3/integration/black_hole_test.go index 1f4c07413..9db83c4cf 100644 --- a/clientv3/integration/black_hole_test.go +++ b/clientv3/integration/black_hole_test.go @@ -47,13 +47,8 @@ func TestBlackholePutWithoutKeealiveEnabled(t *testing.T) { } defer cli.Close() - // wait for eps[0] to be pinned - ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) - _, err = cli.Get(ctx, "foo") - cancel() - if err != nil { - t.Fatal(err) - } + // wait for ep[0] to be pinned + waitPinReady(t, cli) cli.SetEndpoints(clus.Members[0].GRPCAddr(), clus.Members[1].GRPCAddr()) clus.Members[0].Blackhole()