refactor(errors): use errors.is to account wrapped errors

This commit is contained in:
Gusted 2021-08-03 20:30:55 +02:00 committed by Max Mazurov
parent e4fb72ec69
commit 53cb4c06c2
9 changed files with 19 additions and 15 deletions

View file

@ -69,7 +69,7 @@ func TestFuture_WaitCtx(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond)
defer cancel()
_, err := f.GetContext(ctx)
if err != context.DeadlineExceeded {
if !errors.Is(err, context.DeadlineExceeded) {
t.Fatal("context is not cancelled")
}
}