Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conn_test: use errors.Is #1463

Merged
merged 1 commit into from
Jun 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
conn_test: use errors.Is
  • Loading branch information
Zariel committed Jun 24, 2020
commit 6b00be0e242b1350fb038bed62693ce531d8ce54
3 changes: 2 additions & 1 deletion conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"context"
"crypto/tls"
"crypto/x509"
"errors"
"fmt"
"io"
"io/ioutil"
Expand Down Expand Up @@ -242,7 +243,7 @@ func TestStartupTimeout(t *testing.T) {
t.Fatal("ConnectTimeout is not respected")
}

if !strings.Contains(err.Error(), "no connections were made when creating the session") {
if !errors.Is(err, ErrNoConnectionsStarted) {
t.Fatalf("Expected to receive no connections error - got '%s'", err)
}

Expand Down