Fix flaky context error test.
This commit is contained in:
parent
524d1a4915
commit
11f5ddcee4
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue