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"
|
||||
. "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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue