mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
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:
parent
782a8802c0
commit
e4a2dcad9e
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user