Fix flaky context error test.
This commit is contained in:
parent
ba96445704
commit
0879aaf21d
@ -15,8 +15,8 @@ func TestIsCanceled(t *testing.T) {
|
||||
cancel()
|
||||
assert.True(t, IsCanceledError(ctx.Err()))
|
||||
|
||||
ctx, cancel = context.WithTimeout(context.Background(), time.Microsecond)
|
||||
time.Sleep(time.Microsecond * 5)
|
||||
ctx, cancel = context.WithTimeout(context.Background(), time.Microsecond*5)
|
||||
<-ctx.Done()
|
||||
cancel()
|
||||
assert.False(t, IsCanceledError(ctx.Err()))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user