mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #12538 from lzhfromustc/12_9_GoroutineLeak
test: change channel operations to avoid potential goroutine leaks
This commit is contained in:
@@ -213,7 +213,7 @@ func TestApplyRepeat(t *testing.T) {
|
||||
// wait for conf change message
|
||||
act, err := n.Wait(1)
|
||||
// wait for stop message (async to avoid deadlock)
|
||||
stopc := make(chan error)
|
||||
stopc := make(chan error, 1)
|
||||
go func() {
|
||||
_, werr := n.Wait(1)
|
||||
stopc <- werr
|
||||
|
||||
Reference in New Issue
Block a user