mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #4236 from heyitsanthony/fix-watch-test-race
integration: fix race in WatchFromCurrentRevision
This commit is contained in:
commit
de765ac7dd
@ -369,6 +369,10 @@ func TestV3WatchFromCurrentRevision(t *testing.T) {
|
||||
t.Fatalf("#%d: wAPI.Watch error: %v", i, err)
|
||||
}
|
||||
|
||||
if err := wStream.Send(tt.watchRequest); err != nil {
|
||||
t.Fatalf("#%d: wStream.Send error: %v", i, err)
|
||||
}
|
||||
|
||||
go func() {
|
||||
for _, k := range tt.putKeys {
|
||||
kvc := pb.NewKVClient(clus.RandConn())
|
||||
@ -379,10 +383,6 @@ func TestV3WatchFromCurrentRevision(t *testing.T) {
|
||||
}
|
||||
}()
|
||||
|
||||
if err := wStream.Send(tt.watchRequest); err != nil {
|
||||
t.Fatalf("#%d: wStream.Send error: %v", i, err)
|
||||
}
|
||||
|
||||
var createdWatchId int64
|
||||
for j, wresp := range tt.wresps {
|
||||
resp, err := wStream.Recv()
|
||||
|
Loading…
x
Reference in New Issue
Block a user