From 863b41aaa63815d94b5b759ae08d9a23ce96cd16 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Tue, 27 Aug 2019 18:29:38 -0500 Subject: [PATCH] Remove unused sentinal error --- conn.go | 3 --- conn_test.go | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/conn.go b/conn.go index 5a58fa92..d7307a44 100644 --- a/conn.go +++ b/conn.go @@ -86,9 +86,6 @@ func (ident Identifier) Sanitize() string { // ErrNoRows occurs when rows are expected but none are returned. var ErrNoRows = errors.New("no rows in result set") -// ErrDeadConn occurs on an attempt to use a dead connection -var ErrDeadConn = errors.New("conn is dead") - // ErrInvalidLogLevel occurs on attempt to set an invalid log level. var ErrInvalidLogLevel = errors.New("invalid log level") diff --git a/conn_test.go b/conn_test.go index f87c2bb3..673980ab 100644 --- a/conn_test.go +++ b/conn_test.go @@ -627,10 +627,9 @@ func TestFatalRxError(t *testing.T) { var n int32 var s string err := conn.QueryRow(context.Background(), "select 1::int4, pg_sleep(10)::varchar").Scan(&n, &s) - if err == pgx.ErrDeadConn { - } else if pgErr, ok := err.(*pgconn.PgError); ok && pgErr.Severity == "FATAL" { + if pgErr, ok := err.(*pgconn.PgError); ok && pgErr.Severity == "FATAL" { } else { - t.Fatalf("Expected QueryRow Scan to return fatal PgError or ErrDeadConn, but instead received %v", err) + t.Fatalf("Expected QueryRow Scan to return fatal PgError, but instead received %v", err) } }()