From 162347835d1c9ee02a04e6598d7040384882b830 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Thu, 9 Nov 2017 11:18:53 -0800 Subject: [PATCH] clientv3/integration: match grpc.ErrClientConnClosing in TestKVNewAfterClose Signed-off-by: Gyu-Ho Lee --- clientv3/integration/kv_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clientv3/integration/kv_test.go b/clientv3/integration/kv_test.go index b347d6c2bf88..20589d015fe0 100644 --- a/clientv3/integration/kv_test.go +++ b/clientv3/integration/kv_test.go @@ -473,8 +473,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) }()