Skip to content

Commit

Permalink
Merge #139914
Browse files Browse the repository at this point in the history
139914: cdctest: use legacy schema changer when sql smith is enabled r=aerfrei a=wenyihu6

This patch disables the declarative schema changer when TestChangefeedNemeses
uses SQLSmith. Enabling it causes a decoder error, so it is temporarily disabled
as a workaround. This ensures nemesis testing can run in CI with SQLSmith
without being skipped.

Informs: #137125
Release note: None

Co-authored-by: Wenyi Hu <[email protected]>
  • Loading branch information
craig[bot] and wenyihu6 committed Jan 28, 2025
2 parents aba435d + a89d274 commit 630c342
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions pkg/ccl/changefeedccl/nemeses_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@ func TestChangefeedNemeses(t *testing.T) {
skip.UnderRace(t, "takes >1 min under race")

testutils.RunValues(t, "nemeses_options=", cdctest.NemesesOptions, func(t *testing.T, nop cdctest.NemesesOption) {
if nop.EnableSQLSmith == true {
skip.WithIssue(t, 137125)
}
testFn := func(t *testing.T, s TestServer, f cdctest.TestFeedFactory) {
rng, seed := randutil.NewPseudoRand()
t.Logf("random seed: %d", seed)

sqlDB := sqlutils.MakeSQLRunner(s.DB)
withLegacySchemaChanger := maybeDisableDeclarativeSchemaChangesForTest(t, sqlDB)

// TODO(#137125): decoder encounters a bug when the declarative schema
// changer is enabled with SQLSmith
withLegacySchemaChanger := nop.EnableSQLSmith || rng.Float32() < 0.1
if withLegacySchemaChanger {
t.Log("using legacy schema changer")
sqlDB.Exec(t, "SET use_declarative_schema_changer='off'")
sqlDB.Exec(t, "SET CLUSTER SETTING sql.defaults.use_declarative_schema_changer='off'")
}
v, err := cdctest.RunNemesis(f, s.DB, t.Name(), withLegacySchemaChanger, rng, nop)
if err != nil {
t.Fatalf("%+v", err)
Expand Down

0 comments on commit 630c342

Please sign in to comment.