mirror of https://github.com/status-im/consul.git
test: make test less flaky
This commit is contained in:
parent
f44c4e769b
commit
96c677fdba
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue