mirror of
https://github.com/golang/go
synced 2024-11-22 16:44:54 -07:00
context: fix XTestInterlockedCancels
The test does not use Done channel, so fix that. Change-Id: I795feab2e95de815b8b6ee7a7fd90f19f7af7db1 Reviewed-on: https://go-review.googlesource.com/c/go/+/294749 Reviewed-by: Sameer Ajmani <sameer@golang.org> Trust: Sameer Ajmani <sameer@golang.org> Trust: Cody Oss <codyoss@google.com> Run-TryBot: Sameer Ajmani <sameer@golang.org> TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
parent
aaed6cbced
commit
42b9e3a8df
@ -525,7 +525,7 @@ func XTestInterlockedCancels(t testingT) {
|
||||
parent, cancelParent := WithCancel(Background())
|
||||
child, cancelChild := WithCancel(parent)
|
||||
go func() {
|
||||
parent.Done()
|
||||
<-parent.Done()
|
||||
cancelChild()
|
||||
}()
|
||||
cancelParent()
|
||||
|
Loading…
Reference in New Issue
Block a user