Skip to content

Commit 3c9131b

Browse files
craig[bot]jayshrivastava
andcommitted
106852: changefeedccl: enable declarative schema changes in cdc tests r=miretskiy a=jayshrivastava Since declarative schema changes are used in production, they should not be disabled in testing. This change enables declarative schema changes in certain tests. Note there are still some tests which need to be updated in a future PR. Informs: cockroachdb#106846 Release note: None Epic: None Co-authored-by: Jayant Shrivastava <[email protected]>
2 parents 301fa5c + 755841a commit 3c9131b

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

pkg/ccl/changefeedccl/changefeed_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,6 @@ func TestChangefeedUserDefinedTypes(t *testing.T) {
11461146
defer leaktest.AfterTest(t)()
11471147
testFn := func(t *testing.T, s TestServer, f cdctest.TestFeedFactory) {
11481148
sqlDB := sqlutils.MakeSQLRunner(s.DB)
1149-
disableDeclarativeSchemaChangesForTest(t, sqlDB)
11501149
// Set up a type and table.
11511150
sqlDB.Exec(t, `CREATE TYPE t AS ENUM ('hello', 'howdy', 'hi')`)
11521151
sqlDB.Exec(t, `CREATE TABLE tt (x INT PRIMARY KEY, y t)`)
@@ -1551,7 +1550,6 @@ func TestChangefeedSchemaChangeNoBackfill(t *testing.T) {
15511550

15521551
testFn := func(t *testing.T, s TestServer, f cdctest.TestFeedFactory) {
15531552
sqlDB := sqlutils.MakeSQLRunner(s.DB)
1554-
disableDeclarativeSchemaChangesForTest(t, sqlDB)
15551553

15561554
// Schema changes that predate the changefeed.
15571555
t.Run(`historical`, func(t *testing.T) {
@@ -2581,7 +2579,6 @@ func TestChangefeedSingleColumnFamilySchemaChanges(t *testing.T) {
25812579

25822580
testFn := func(t *testing.T, s TestServer, f cdctest.TestFeedFactory) {
25832581
sqlDB := sqlutils.MakeSQLRunner(s.DB)
2584-
disableDeclarativeSchemaChangesForTest(t, sqlDB)
25852582

25862583
// Table with 2 column families.
25872584
sqlDB.Exec(t, `CREATE TABLE foo (a INT PRIMARY KEY, b STRING, c STRING, FAMILY most (a,b), FAMILY rest (c))`)
@@ -2620,7 +2617,6 @@ func TestChangefeedEachColumnFamilySchemaChanges(t *testing.T) {
26202617

26212618
testFn := func(t *testing.T, s TestServer, f cdctest.TestFeedFactory) {
26222619
sqlDB := sqlutils.MakeSQLRunner(s.DB)
2623-
disableDeclarativeSchemaChangesForTest(t, sqlDB)
26242620

26252621
// Table with 2 column families.
26262622
sqlDB.Exec(t, `CREATE TABLE foo (a INT PRIMARY KEY, b STRING, c STRING, FAMILY f1 (a,b), FAMILY f2 (c))`)
@@ -3612,7 +3608,6 @@ func TestChangefeedNoBackfill(t *testing.T) {
36123608
skip.UnderShort(t)
36133609
testFn := func(t *testing.T, s TestServer, f cdctest.TestFeedFactory) {
36143610
sqlDB := sqlutils.MakeSQLRunner(s.DB)
3615-
disableDeclarativeSchemaChangesForTest(t, sqlDB)
36163611
// Shorten the intervals so this test doesn't take so long. We need to wait
36173612
// for timestamps to get resolved.
36183613
sqlDB.Exec(t, "SET CLUSTER SETTING changefeed.experimental_poll_interval = '200ms'")
@@ -3687,12 +3682,7 @@ func TestChangefeedNoBackfill(t *testing.T) {
36873682
})
36883683
sqlDB.Exec(t, `ALTER TABLE drop_column DROP COLUMN b`)
36893684
sqlDB.Exec(t, `INSERT INTO drop_column VALUES (2)`)
3690-
// NB: You might expect to only see the new row here but we'll see them
3691-
// all because we cannot distinguish between the index backfill and
3692-
// foreground writes. See #35738.
36933685
assertPayloads(t, dropColumn, []string{
3694-
`drop_column: [0]->{"after": {"a": 0}}`,
3695-
`drop_column: [1]->{"after": {"a": 1}}`,
36963686
`drop_column: [2]->{"after": {"a": 2}}`,
36973687
})
36983688
})

0 commit comments

Comments
 (0)