Skip to content

Commit a4981fb

Browse files
craig[bot]andyyang890
andcommitted
Merge #153424
153424: changefeedccl: replace incorrect usage of QueryRow in tests r=log-head a=andyyang890 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. Epic: None Release note: None Co-authored-by: Andy Yang <[email protected]>
2 parents 6d8694c + 5e59740 commit a4981fb

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
@@ -317,7 +317,7 @@ func TestAlterChangefeedAddTargetAfterInitialScan(t *testing.T) {
317317
t.Fatalf("unknown initial scan type %q", initialScan)
318318
}
319319

320-
sqlDB.QueryRow(t, `INSERT INTO foo VALUES(2)`)
320+
sqlDB.Exec(t, `INSERT INTO foo VALUES(2)`)
321321
assertPayloads(t, testFeed, []string{
322322
`foo: [2]->{"after": {"a": 2}}`,
323323
})
@@ -1946,7 +1946,7 @@ func TestAlterChangefeedAddDropSameTarget(t *testing.T) {
19461946
sqlDB.Exec(t, fmt.Sprintf(`ALTER CHANGEFEED %d ADD bar DROP bar`, feed.JobID()))
19471947
require.NoError(t, feed.Resume())
19481948
var tsStr string
1949-
sqlDB.QueryRow(t, `INSERT INTO bar VALUES(1)`)
1949+
sqlDB.Exec(t, `INSERT INTO bar VALUES(1)`)
19501950
sqlDB.QueryRow(t, `INSERT INTO foo VALUES(2) RETURNING cluster_logical_timestamp()`).Scan(&tsStr)
19511951
ts := parseTimeToHLC(t, tsStr)
19521952
require.NoError(t, feed.WaitForHighWaterMark(ts))

0 commit comments

Comments
 (0)