Skip to content

Commit 02afe1d

Browse files
committed
seed the result with a sentinel explicitly in TestReset
1 parent 203cac4 commit 02afe1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

driver_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2439,8 +2439,8 @@ func TestReset(t *testing.T) {
24392439
if err != nil {
24402440
dbt.fail("Conn", "QueryContext", err)
24412441
}
2442-
// We intentionally do not clear the destination before calling Next()
2443-
// to make sure the SELECT really returns nil
2442+
// Seed with a sentinel to ensure Rows.Next overwrites it with nil.
2443+
result = []driver.Value{"sentinel-non-nil"}
24442444
err = rows.Next(result)
24452445
if err != nil {
24462446
dbt.fail("Rows", "Next", err)

0 commit comments

Comments
 (0)