Merge pull request #1580 from ifedorenko/tests-errors-cause

Use errors.Cause in backend TestListCancel
This commit is contained in:
Alexander Neumann 2018-01-25 20:55:43 +01:00
commit d62a664bb7

View file

@ -381,7 +381,7 @@ func (s *Suite) TestListCancel(t *testing.T) {
return nil
})
if err != context.Canceled {
if errors.Cause(err) != context.Canceled {
t.Fatalf("expected error not found, want %v, got %v", context.Canceled, err)
}
@ -404,7 +404,7 @@ func (s *Suite) TestListCancel(t *testing.T) {
return nil
})
if err != context.Canceled {
if errors.Cause(err) != context.Canceled {
t.Fatalf("expected error not found, want %v, got %v", context.Canceled, err)
}
@ -432,7 +432,7 @@ func (s *Suite) TestListCancel(t *testing.T) {
return nil
})
if err != context.DeadlineExceeded {
if errors.Cause(err) != context.DeadlineExceeded {
t.Fatalf("expected error not found, want %#v, got %#v", context.DeadlineExceeded, err)
}