Skip to content

Commit 38a110d

Browse files
committed
changefeedccl: replace incorrect usage of QueryRow in tests
Two recently added ALTER CHANGEFEED unit tests use `QueryRow` instead of `Exec` for queries that don't return values, which technically could allow an error to go unnoticed. This patch corrects that. Release note: None
1 parent 0e35b2b commit 38a110d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/ccl/changefeedccl/alter_changefeed_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ func TestAlterChangefeedAddTargetAfterInitialScan(t *testing.T) {
305305
t.Fatalf("unknown initial scan type %q", initialScan)
306306
}
307307

308-
sqlDB.QueryRow(t, `INSERT INTO foo VALUES(2)`)
308+
sqlDB.Exec(t, `INSERT INTO foo VALUES(2)`)
309309
assertPayloads(t, testFeed, []string{
310310
`foo: [2]->{"after": {"a": 2}}`,
311311
})
@@ -1915,7 +1915,7 @@ func TestAlterChangefeedAddDropSameTarget(t *testing.T) {
19151915
sqlDB.Exec(t, fmt.Sprintf(`ALTER CHANGEFEED %d ADD bar DROP bar`, feed.JobID()))
19161916
require.NoError(t, feed.Resume())
19171917
var tsStr string
1918-
sqlDB.QueryRow(t, `INSERT INTO bar VALUES(1)`)
1918+
sqlDB.Exec(t, `INSERT INTO bar VALUES(1)`)
19191919
sqlDB.QueryRow(t, `INSERT INTO foo VALUES(2) RETURNING cluster_logical_timestamp()`).Scan(&tsStr)
19201920
ts := parseTimeToHLC(t, tsStr)
19211921
require.NoError(t, feed.WaitForHighWaterMark(ts))

0 commit comments

Comments
 (0)