mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
clientv3/integration: fix TestTxnWriteFail
It might take client request more than dialtimeout to fail when we kill the connection when the client is sending request.
This commit is contained in:
parent
6650db53a4
commit
3886129f52
@ -45,8 +45,9 @@ func TestTxnWriteFail(t *testing.T) {
|
||||
donec <- struct{}{}
|
||||
}()
|
||||
|
||||
dialTimeout := 5 * time.Second
|
||||
select {
|
||||
case <-time.After(5 * time.Second):
|
||||
case <-time.After(2*dialTimeout + time.Second):
|
||||
t.Fatalf("timed out waiting for txn to fail")
|
||||
case <-donec:
|
||||
// don't restart cluster until txn errors out
|
||||
|
Loading…
x
Reference in New Issue
Block a user