mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-07 06:57:37 +03:00
refactor(errors): use errors.is
to account wrapped errors
This commit is contained in:
parent
e4fb72ec69
commit
53cb4c06c2
9 changed files with 19 additions and 15 deletions
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue