mirror of
https://github.com/golang/go
synced 2024-11-19 20:54:39 -07:00
os/signal: increase timeout from 10ms to 100ms
Might make test less flaky. Fixes #8682. LGTM=bradfitz R=bradfitz CC=golang-codereviews https://golang.org/cl/143160043
This commit is contained in:
parent
95c899f03c
commit
c1e332020d
@ -125,7 +125,7 @@ func TestStop(t *testing.T) {
|
|||||||
if sig != syscall.SIGHUP || *sendUncaughtSighup == 1 {
|
if sig != syscall.SIGHUP || *sendUncaughtSighup == 1 {
|
||||||
syscall.Kill(syscall.Getpid(), sig)
|
syscall.Kill(syscall.Getpid(), sig)
|
||||||
}
|
}
|
||||||
time.Sleep(10 * time.Millisecond)
|
time.Sleep(100 * time.Millisecond)
|
||||||
|
|
||||||
// Ask for signal
|
// Ask for signal
|
||||||
c := make(chan os.Signal, 1)
|
c := make(chan os.Signal, 1)
|
||||||
@ -140,7 +140,7 @@ func TestStop(t *testing.T) {
|
|||||||
select {
|
select {
|
||||||
case s := <-c:
|
case s := <-c:
|
||||||
t.Fatalf("unexpected signal %v", s)
|
t.Fatalf("unexpected signal %v", s)
|
||||||
case <-time.After(10 * time.Millisecond):
|
case <-time.After(100 * time.Millisecond):
|
||||||
// nothing to read - good
|
// nothing to read - good
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ func TestStop(t *testing.T) {
|
|||||||
select {
|
select {
|
||||||
case s := <-c:
|
case s := <-c:
|
||||||
t.Fatalf("unexpected signal %v", s)
|
t.Fatalf("unexpected signal %v", s)
|
||||||
case <-time.After(10 * time.Millisecond):
|
case <-time.After(100 * time.Millisecond):
|
||||||
// nothing to read - good
|
// nothing to read - good
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user