Skip to content

Commit

Permalink
fix TestRawBytesAreNotModified called parent t.Fatal()
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Dec 12, 2023
1 parent a560843 commit ae976ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3181,14 +3181,14 @@ func TestRawBytesAreNotModified(t *testing.T) {

rows, err := dbt.db.QueryContext(ctx, `SELECT id, value FROM test`)
if err != nil {
t.Fatal(err)
dbt.Fatal(err)
}

var b int
var raw sql.RawBytes
for rows.Next() {
if err := rows.Scan(&b, &raw); err != nil {
t.Fatal(err)
dbt.Fatal(err)
}

before := string(raw)
Expand All @@ -3198,7 +3198,7 @@ func TestRawBytesAreNotModified(t *testing.T) {
after := string(raw)

if before != after {
t.Fatalf("the backing storage for sql.RawBytes has been modified (i=%v)", i)
dbt.Fatalf("the backing storage for sql.RawBytes has been modified (i=%v)", i)
}
}
rows.Close()
Expand Down

0 comments on commit ae976ad

Please sign in to comment.