mirror of
https://github.com/restic/restic.git
synced 2025-04-25 08:34:26 +00:00
Hopefully fix flaky TestLockWaitCancel test
This commit is contained in:
parent
20e82d1fcf
commit
76253b2a20
@ -289,10 +289,10 @@ func TestLockWaitCancel(t *testing.T) {
|
|||||||
retryLock := 200 * time.Millisecond
|
retryLock := 200 * time.Millisecond
|
||||||
cancelAfter := 40 * time.Millisecond
|
cancelAfter := 40 * time.Millisecond
|
||||||
|
|
||||||
|
start := time.Now()
|
||||||
ctx, cancel := context.WithCancel(context.TODO())
|
ctx, cancel := context.WithCancel(context.TODO())
|
||||||
time.AfterFunc(cancelAfter, cancel)
|
time.AfterFunc(cancelAfter, cancel)
|
||||||
|
|
||||||
start := time.Now()
|
|
||||||
lock, _, err := lockRepo(ctx, repo, retryLock, env.gopts.JSON)
|
lock, _, err := lockRepo(ctx, repo, retryLock, env.gopts.JSON)
|
||||||
duration := time.Since(start)
|
duration := time.Since(start)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user