mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #6007 from heyitsanthony/fix-watch-test
integration: fix race in TestV3WatchMultipleEventsTxnSynced
This commit is contained in:
commit
a7b098b26d
@ -672,6 +672,9 @@ func testV3WatchMultipleEventsTxn(t *testing.T, startRev int64) {
|
||||
if err := wStream.Send(wreq); err != nil {
|
||||
t.Fatalf("wStream.Send error: %v", err)
|
||||
}
|
||||
if resp, err := wStream.Recv(); err != nil || resp.Created == false {
|
||||
t.Fatalf("create response failed: resp=%v, err=%v", resp, err)
|
||||
}
|
||||
|
||||
kvc := toGRPC(clus.RandClient()).KV
|
||||
txn := pb.TxnRequest{}
|
||||
@ -697,9 +700,6 @@ func testV3WatchMultipleEventsTxn(t *testing.T, startRev int64) {
|
||||
if err != nil {
|
||||
t.Errorf("wStream.Recv error: %v", err)
|
||||
}
|
||||
if resp.Created {
|
||||
continue
|
||||
}
|
||||
events = append(events, resp.Events...)
|
||||
}
|
||||
sort.Sort(eventsSortByKey(events))
|
||||
|
Loading…
x
Reference in New Issue
Block a user