Fixed potential test failures due to timing.

This commit is contained in:
mikestefanello 2022-05-17 08:57:43 -04:00
parent ecd0120920
commit 7c8ecc2ebe
2 changed files with 4 additions and 3 deletions

View file

@ -16,7 +16,7 @@ func TestIsCanceled(t *testing.T) {
assert.True(t, IsCanceledError(ctx.Err()))
ctx, cancel = context.WithTimeout(context.Background(), time.Microsecond)
time.Sleep(time.Microsecond * 2)
time.Sleep(time.Microsecond * 5)
cancel()
assert.False(t, IsCanceledError(ctx.Err()))