Skip to content

Commit d904868

Browse files
committed
test fix: remove timeout after first lock
1 parent 52a6972 commit d904868

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extensions/internal/lock/lock_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ func TestLockError(t *testing.T) {
6464
}
6565

6666
func TestLockTimeout(t *testing.T) {
67-
defer func(d time.Duration) { timeout = d }(timeout)
68-
timeout = 0
69-
7067
p := filepath.Join(t.TempDir(), t.Name())
7168
a, err := New(p, 0)
7269
require.NoError(t, err)
7370
err = a.Lock(ctx)
7471
require.NoError(t, err)
72+
73+
defer func(d time.Duration) { timeout = d }(timeout)
74+
timeout = 0
7575
b, err := New(p, 0)
7676
require.NoError(t, err)
7777

0 commit comments

Comments
 (0)