diff options
Diffstat (limited to 'modules/globallock/globallock_test.go')
-rw-r--r-- | modules/globallock/globallock_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/globallock/globallock_test.go b/modules/globallock/globallock_test.go index f14c7d656b..8d55d9f699 100644 --- a/modules/globallock/globallock_test.go +++ b/modules/globallock/globallock_test.go @@ -66,11 +66,11 @@ func TestLockAndDo(t *testing.T) { func testLockAndDo(t *testing.T) { const concurrency = 50 - ctx := context.Background() + ctx := t.Context() count := 0 wg := sync.WaitGroup{} wg.Add(concurrency) - for i := 0; i < concurrency; i++ { + for range concurrency { go func() { defer wg.Done() err := LockAndDo(ctx, "test", func(ctx context.Context) error { |