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 f44c4e769b
commit 96c677fdba
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())
}