test: make test less flaky

This commit is contained in:
Frank Schroeder 2017-05-12 21:44:47 +02:00 committed by Frank Schröder
parent afaf4431ee
commit 995c8d7086
1 changed files with 1 additions and 1 deletions

View File

@ -500,7 +500,7 @@ func TestSemaphore_OneShot(t *testing.T) {
t.Fatalf("should not have acquired the semaphore")
}
diff := time.Now().Sub(start)
if diff < contender.opts.SemaphoreWaitTime || diff > 2*contender.opts.SemaphoreWaitTime {
if diff < contender.opts.SemaphoreWaitTime {
t.Fatalf("time out of bounds: %9.6f", diff.Seconds())
}