Commit 8c25e08f authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

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
parent c6442c99
......@@ -165,7 +165,8 @@ func TestGcLastTime(t *testing.T) {
t.Fatalf("bad last GC time: got %v, want [%v, %v]", last, t0, t1)
}
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)
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment