mirror of https://github.com/golang/go.git
Initial fix for TestCondSignalStealing fix
This commit is contained in:
parent
20e9b7f1b5
commit
0fa6f08a70
|
|
@ -9,7 +9,6 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
. "sync"
|
. "sync"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCondSignal(t *testing.T) {
|
func TestCondSignal(t *testing.T) {
|
||||||
|
|
@ -228,11 +227,7 @@ func TestCondSignalStealing(t *testing.T) {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
// Check that the first waiter does get signaled.
|
// Check that the first waiter does get signaled.
|
||||||
select {
|
<-ch
|
||||||
case <-ch:
|
|
||||||
case <-time.After(2 * time.Second):
|
|
||||||
t.Fatalf("First waiter didn't get broadcast.")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Release the second waiter in case it didn't get the
|
// Release the second waiter in case it didn't get the
|
||||||
// broadcast.
|
// broadcast.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue