clientv3/integration: use waitPinReady in blackhole test

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyu-Ho Lee
2017-10-26 15:12:27 -07:00
parent af53f54042
commit 6a8d6b6ad9

View File

@@ -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()