mirror of
https://github.com/samber/lo.git
synced 2026-04-22 15:37:14 +08:00
fix(test): Increase timeout values in concurrency tests (#775)
This commit is contained in:
+3
-3
@@ -300,7 +300,7 @@ func TestWaitForWithContext(t *testing.T) { //nolint:paralleltest
|
||||
t.Run("counter is incremented", func(t *testing.T) { //nolint:paralleltest
|
||||
// t.Parallel()
|
||||
|
||||
testWithTimeout(t, 100*time.Millisecond)
|
||||
testWithTimeout(t, 150*time.Millisecond)
|
||||
is := assert.New(t)
|
||||
|
||||
counter := 0
|
||||
@@ -310,9 +310,9 @@ func TestWaitForWithContext(t *testing.T) { //nolint:paralleltest
|
||||
return false
|
||||
}
|
||||
|
||||
iter, duration, ok := WaitForWithContext(context.Background(), alwaysFalse, 40*time.Millisecond, 10*time.Millisecond)
|
||||
iter, duration, ok := WaitForWithContext(context.Background(), alwaysFalse, 80*time.Millisecond, 20*time.Millisecond)
|
||||
is.Equal(counter, iter, "unexpected iteration count")
|
||||
is.InDelta(40*time.Millisecond, duration, float64(5*time.Millisecond))
|
||||
is.InDelta(80*time.Millisecond, duration, float64(10*time.Millisecond))
|
||||
is.False(ok)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user