From e4a2dcad9ead3c69cad32e2230e92b3cac2fcc3c Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Wed, 18 May 2016 14:49:39 -0700 Subject: [PATCH] clientv3/integration: ignore closing transport in TestKVPutStoppedServerAndClose The grpc "transport is closing" error is rasied when the host is unreachable; there's no good way to avoid it for a Put. Fixes #5343 --- clientv3/integration/kv_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clientv3/integration/kv_test.go b/clientv3/integration/kv_test.go index 817d1efc2..391022bef 100644 --- a/clientv3/integration/kv_test.go +++ b/clientv3/integration/kv_test.go @@ -579,7 +579,9 @@ func TestKVPutStoppedServerAndClose(t *testing.T) { clus.Members[0].Stop(t) // this Put fails and triggers an asynchronous connection retry _, err := clus.Client(0).Put(context.TODO(), "abc", "123") - if err == nil || !strings.Contains(err.Error(), "connection is closing") { + if err == nil || + (!strings.Contains(err.Error(), "connection is closing") && + !strings.Contains(err.Error(), "transport is closing")) { t.Fatal(err) } // cluster will terminate and close the client with the retry in-flight