Tweak error reporting on TestFatalRxError

pull/126/head
Jack Christensen 2016-03-15 08:28:07 -05:00
parent f12ae84ac5
commit d88242b0ca
1 changed files with 1 additions and 1 deletions

View File

@ -1198,7 +1198,7 @@ func TestFatalRxError(t *testing.T) {
var n int32
var s string
err := conn.QueryRow("select 1::int4, pg_sleep(10)::varchar").Scan(&n, &s)
if err, ok := err.(pgx.PgError); !ok || err.Severity != "FATAL" {
if pgErr, ok := err.(pgx.PgError); !ok || pgErr.Severity != "FATAL" {
t.Fatalf("Expected QueryRow Scan to return fatal PgError, but instead received %v", err)
}
}()