mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clientv3/integration: use waitPinReady in blackhole test
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user