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>
"runtime"
. "sync"
"testing"
- "time"
)
func TestCondSignal(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.