forked from TrueCloudLab/restic
lock: increase test timeout tolerances to avoid test failures
This commit is contained in:
parent
ea59896bd6
commit
8ce5f29758
1 changed files with 2 additions and 2 deletions
|
@ -188,7 +188,7 @@ func TestLockWaitTimeout(t *testing.T) {
|
||||||
"create normal lock with exclusively locked repo didn't return an error")
|
"create normal lock with exclusively locked repo didn't return an error")
|
||||||
test.Assert(t, strings.Contains(err.Error(), "repository is already locked exclusively"),
|
test.Assert(t, strings.Contains(err.Error(), "repository is already locked exclusively"),
|
||||||
"create normal lock with exclusively locked repo didn't return the correct error")
|
"create normal lock with exclusively locked repo didn't return the correct error")
|
||||||
test.Assert(t, retryLock <= duration && duration < retryLock+5*time.Millisecond,
|
test.Assert(t, retryLock <= duration && duration < retryLock+50*time.Millisecond,
|
||||||
"create normal lock with exclusively locked repo didn't wait for the specified timeout")
|
"create normal lock with exclusively locked repo didn't wait for the specified timeout")
|
||||||
|
|
||||||
test.OK(t, lock.Unlock())
|
test.OK(t, lock.Unlock())
|
||||||
|
@ -215,7 +215,7 @@ func TestLockWaitCancel(t *testing.T) {
|
||||||
"create normal lock with exclusively locked repo didn't return an error")
|
"create normal lock with exclusively locked repo didn't return an error")
|
||||||
test.Assert(t, strings.Contains(err.Error(), "context canceled"),
|
test.Assert(t, strings.Contains(err.Error(), "context canceled"),
|
||||||
"create normal lock with exclusively locked repo didn't return the correct error")
|
"create normal lock with exclusively locked repo didn't return the correct error")
|
||||||
test.Assert(t, cancelAfter <= duration && duration < cancelAfter+5*time.Millisecond,
|
test.Assert(t, cancelAfter <= duration && duration < cancelAfter+50*time.Millisecond,
|
||||||
"create normal lock with exclusively locked repo didn't return in time")
|
"create normal lock with exclusively locked repo didn't return in time")
|
||||||
|
|
||||||
test.OK(t, lock.Unlock())
|
test.OK(t, lock.Unlock())
|
||||||
|
|
Loading…
Reference in a new issue