Remove unused sentinal error
This commit is contained in:
@@ -86,9 +86,6 @@ func (ident Identifier) Sanitize() string {
|
|||||||
// ErrNoRows occurs when rows are expected but none are returned.
|
// ErrNoRows occurs when rows are expected but none are returned.
|
||||||
var ErrNoRows = errors.New("no rows in result set")
|
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.
|
// ErrInvalidLogLevel occurs on attempt to set an invalid log level.
|
||||||
var ErrInvalidLogLevel = errors.New("invalid log level")
|
var ErrInvalidLogLevel = errors.New("invalid log level")
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -627,10 +627,9 @@ func TestFatalRxError(t *testing.T) {
|
|||||||
var n int32
|
var n int32
|
||||||
var s string
|
var s string
|
||||||
err := conn.QueryRow(context.Background(), "select 1::int4, pg_sleep(10)::varchar").Scan(&n, &s)
|
err := conn.QueryRow(context.Background(), "select 1::int4, pg_sleep(10)::varchar").Scan(&n, &s)
|
||||||
if err == pgx.ErrDeadConn {
|
if pgErr, ok := err.(*pgconn.PgError); ok && pgErr.Severity == "FATAL" {
|
||||||
} else if pgErr, ok := err.(*pgconn.PgError); ok && pgErr.Severity == "FATAL" {
|
|
||||||
} else {
|
} 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)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user