mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #8457 from mitake/fix-false-groutine-leaks
integration: clean up resources in error paths of TestV3WatchFromCurr…
This commit is contained in:
commit
86d15d1b1c
@ -223,20 +223,24 @@ func TestV3WatchFromCurrentRevision(t *testing.T) {
|
||||
cresp, err := wStream.Recv()
|
||||
if err != nil {
|
||||
t.Errorf("#%d: wStream.Recv error: %v", i, err)
|
||||
clus.Terminate(t)
|
||||
continue
|
||||
}
|
||||
if !cresp.Created {
|
||||
t.Errorf("#%d: did not create watchid, got %+v", i, cresp)
|
||||
clus.Terminate(t)
|
||||
continue
|
||||
}
|
||||
if cresp.Canceled {
|
||||
t.Errorf("#%d: canceled watcher on create %+v", i, cresp)
|
||||
clus.Terminate(t)
|
||||
continue
|
||||
}
|
||||
|
||||
createdWatchId := cresp.WatchId
|
||||
if cresp.Header == nil || cresp.Header.Revision != 1 {
|
||||
t.Errorf("#%d: header revision got +%v, wanted revison 1", i, cresp)
|
||||
clus.Terminate(t)
|
||||
continue
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user