Skip to content

Commit

Permalink
conn_test: use errors.Is (apache#1463)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zariel authored Jun 24, 2020
1 parent b787660 commit 34081ed
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 34081ed

Please sign in to comment.