]> Cypherpunks repositories - gostls13.git/commitdiff
context: fix XTestInterlockedCancels
authorKeiichi Hirobe <chalenge.akane@gmail.com>
Sun, 21 Feb 2021 03:22:13 +0000 (12:22 +0900)
committerSameer Ajmani <sameer@golang.org>
Tue, 23 Feb 2021 22:54:59 +0000 (22:54 +0000)
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>

src/context/context_test.go

index 6b392a29da5ed3e4fa4ff2590431131e351caeb4..84eef01da1f38168c00d30763d1e1a8bb217f42f 100644 (file)
@@ -525,7 +525,7 @@ func XTestInterlockedCancels(t testingT) {
        parent, cancelParent := WithCancel(Background())
        child, cancelChild := WithCancel(parent)
        go func() {
-               parent.Done()
+               <-parent.Done()
                cancelChild()
        }()
        cancelParent()