aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeiichi Hirobe <chalenge.akane@gmail.com>2021-02-21 12:22:13 +0900
committerSameer Ajmani <sameer@golang.org>2021-02-23 22:54:59 +0000
commit42b9e3a8dfb31f18829c45f0995cbf3c78fc90fb (patch)
treed69db3b50a7a17ed8f9a38bd7917497334841fd1 /src
parentaaed6cbced238030053df4e54f676a1d59df89d7 (diff)
downloadgo-42b9e3a8dfb31f18829c45f0995cbf3c78fc90fb.tar.xz
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>
Diffstat (limited to 'src')
-rw-r--r--src/context/context_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/context/context_test.go b/src/context/context_test.go
index 6b392a29da..84eef01da1 100644
--- a/src/context/context_test.go
+++ b/src/context/context_test.go
@@ -525,7 +525,7 @@ func XTestInterlockedCancels(t testingT) {
parent, cancelParent := WithCancel(Background())
child, cancelChild := WithCancel(parent)
go func() {
- parent.Done()
+ <-parent.Done()
cancelChild()
}()
cancelParent()