Skip to content

Commit 7e0db47

Browse files
committed
Fix lint
1 parent 2715478 commit 7e0db47

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lock/locktesting/locktesting.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func TestProviderLocking(
4040
}
4141
// Sanity check - ensure providers have migration sources
4242
sources := providers[0].ListSources()
43-
require.Greater(t, len(sources), 0, "no migration sources found - check provider fsys")
43+
require.NotEmpty(t, sources, "no migration sources found - check provider fsys")
4444
maxVersion := sources[len(sources)-1].Version
4545
// Ensure all providers have the same sources
4646
for _, p := range providers {
@@ -168,9 +168,10 @@ func TestConcurrentLocking(
168168
// Release the lock
169169
if err := lockers[i].Unlock(ctx, db); err != nil {
170170
t.Errorf("Locker %d failed to release lock: %v", i, err)
171-
} else {
172-
// logger.Debug("Locker released lock", slog.Int("locker", i))
173171
}
172+
// } else {
173+
// logger.Debug("Locker released lock", slog.Int("locker", i))
174+
// }
174175
}()
175176
}
176177
// Wait for all goroutines with timeout
@@ -194,6 +195,6 @@ func TestConcurrentLocking(
194195
successful = append(successful, id)
195196
}
196197

197-
require.Equal(t, 1, len(successful), "Exactly one locker should acquire the lock")
198+
require.Len(t, successful, 1, "Exactly one locker should acquire the lock")
198199
// logger.Debug("Concurrent locking test passed", slog.Int("winning_locker", successful[0]))
199200
}

0 commit comments

Comments
 (0)