Commit db80edde authored by Shenghou Ma's avatar Shenghou Ma

time: during short test, do not bother tickers take longer than expected

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5752058
parent aabbcda8
......@@ -22,7 +22,7 @@ func TestTicker(t *testing.T) {
dt := t1.Sub(t0)
target := Delta * Count
slop := target * 2 / 10
if dt < target-slop || dt > target+slop {
if dt < target-slop || (!testing.Short() && dt > target+slop) {
t.Fatalf("%d %s ticks took %s, expected [%s,%s]", Count, Delta, dt, target-slop, target+slop)
}
// Now test that the ticker stopped
......
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