mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #14287 from VladSaioc/bugfix-queue-test
Fixed goroutine leak
This commit is contained in:
commit
9e9e500d57
@ -37,6 +37,9 @@ func TestQueueOneReaderOneWriter(t *testing.T) {
|
||||
defer clus.Terminate(t)
|
||||
|
||||
done := make(chan struct{})
|
||||
defer func() {
|
||||
<-done
|
||||
}()
|
||||
go func() {
|
||||
defer func() {
|
||||
done <- struct{}{}
|
||||
@ -61,7 +64,6 @@ func TestQueueOneReaderOneWriter(t *testing.T) {
|
||||
t.Fatalf("expected dequeue value %v, got %v", s, i)
|
||||
}
|
||||
}
|
||||
<-done
|
||||
}
|
||||
|
||||
func TestQueueManyReaderOneWriter(t *testing.T) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user