clientv3/integration: match grpc.ErrClientConnClosing in TestKVNewAfterClose

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyu-Ho Lee 2017-11-09 11:18:53 -08:00
parent 103efd922b
commit 123b869a0f

View File

@ -472,8 +472,9 @@ func TestKVNewAfterClose(t *testing.T) {
donec := make(chan struct{})
go func() {
if _, err := cli.Get(context.TODO(), "foo"); err != context.Canceled {
t.Fatalf("expected %v, got %v", context.Canceled, err)
_, err := cli.Get(context.TODO(), "foo")
if err != context.Canceled && err != grpc.ErrClientConnClosing {
t.Fatalf("expected %v or %v, got %v", context.Canceled, grpc.ErrClientConnClosing, err)
}
close(donec)
}()