Skip to content

Commit 30123a5

Browse files
committed
test(throttle): increase elapsed time assertion threshold
1 parent e729be1 commit 30123a5

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

internal/analytics/throttle_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func TestThrottle_WaitInterRepo(t *testing.T) {
215215
elapsed := time.Since(start)
216216

217217
require.NoError(t, err)
218-
assert.Less(t, elapsed, 10*time.Millisecond)
218+
assert.Less(t, elapsed, 50*time.Millisecond)
219219
})
220220

221221
t.Run("cancels on context cancellation", func(t *testing.T) {

internal/metrics/timing_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ func TestTimer_GetElapsed(t *testing.T) {
320320
// Get initial elapsed time (should be very small)
321321
elapsed1 := timer.GetElapsed()
322322
assert.GreaterOrEqual(t, elapsed1, time.Duration(0), "initial elapsed time should be non-negative")
323-
assert.Less(t, elapsed1, time.Millisecond, "initial elapsed time should be very small")
323+
assert.Less(t, elapsed1, 50*time.Millisecond, "initial elapsed time should be very small")
324324

325325
// Wait a bit and check again
326326
time.Sleep(5 * time.Millisecond)

0 commit comments

Comments
 (0)