mirror of
https://github.com/golang/go
synced 2024-11-19 08:44:39 -07:00
runtime: fix TestGcLastTime on windows
Intended to fix: http://build.golang.org/log/d6718ea67541b8c6be2bb14bcbc4e1c4261f67d7 LGTM=khr R=golang-codereviews, khr CC=golang-codereviews https://golang.org/cl/127520043
This commit is contained in:
parent
c6442c994a
commit
8c25e08fbd
@ -165,7 +165,8 @@ func TestGcLastTime(t *testing.T) {
|
|||||||
t.Fatalf("bad last GC time: got %v, want [%v, %v]", last, t0, t1)
|
t.Fatalf("bad last GC time: got %v, want [%v, %v]", last, t0, t1)
|
||||||
}
|
}
|
||||||
pause := ms.PauseNs[(ms.NumGC+255)%256]
|
pause := ms.PauseNs[(ms.NumGC+255)%256]
|
||||||
if pause == 0 || pause > 10e9 {
|
// Due to timer granularity pause can actually be 0 on windows.
|
||||||
|
if (pause == 0 && runtime.GOOS != "windows") || pause > 10e9 {
|
||||||
t.Fatalf("bad last GC pause: got %v, want [0, 10e9]", pause)
|
t.Fatalf("bad last GC pause: got %v, want [0, 10e9]", pause)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user