aboutsummaryrefslogtreecommitdiff
path: root/src/sync
diff options
context:
space:
mode:
authorCollin Wright <1011collin@gmail.com>2023-03-20 23:27:04 +0000
committerGopher Robot <gobot@golang.org>2023-03-22 18:52:42 +0000
commit4a3071696ddfb13e1a8f35f76197b7b3143492f4 (patch)
treea1c39915584974ede4a76a72dca16774a663866e /src/sync
parent09f1ddb1589eb1b5b20d80e5e818f6d491791c38 (diff)
downloadgo-4a3071696ddfb13e1a8f35f76197b7b3143492f4.tar.gz
go-4a3071696ddfb13e1a8f35f76197b7b3143492f4.zip
sync: fix TestCondSignalStealing flake
Fixes: #59043 Change-Id: I8215948a772566641dab1079a9837128450deb1b GitHub-Last-Rev: 0fa6f08a70658e1272da0c82812de752350d394d GitHub-Pull-Request: golang/go#59160 Reviewed-on: https://go-review.googlesource.com/c/go/+/477955 Run-TryBot: Ian Lance Taylor <iant@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/sync')
-rw-r--r--src/sync/cond_test.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/sync/cond_test.go b/src/sync/cond_test.go
index 859cae59bc..aa134e3c1d 100644
--- a/src/sync/cond_test.go
+++ b/src/sync/cond_test.go
@@ -9,7 +9,6 @@ import (
"runtime"
. "sync"
"testing"
- "time"
)
func TestCondSignal(t *testing.T) {
@@ -228,11 +227,7 @@ func TestCondSignalStealing(t *testing.T) {
}()
// Check that the first waiter does get signaled.
- select {
- case <-ch:
- case <-time.After(2 * time.Second):
- t.Fatalf("First waiter didn't get broadcast.")
- }
+ <-ch
// Release the second waiter in case it didn't get the
// broadcast.