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
This commit is contained in:
Anthony Romano 2016-05-18 14:49:39 -07:00
parent 782a8802c0
commit e4a2dcad9e

View File

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