Skip to content

Commit

Permalink
spanconfigreconcilerccl: Use deterministic descriptor ID generation f…
Browse files Browse the repository at this point in the history
…or test

This PR updates the spanconfigreconciler data driven test
to use transactional descriptor ID generation
(cockroachdb#85444) to generate
deterministic descriptor IDs. This will help avoid test flakes around
changing descriptor IDs due to transaction retries etc.

Epic: none
Fixes: cockroachdb#122343
Release note: None
  • Loading branch information
rimadeodhar committed Apr 19, 2024
1 parent 1abcc00 commit b1501c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/ccl/spanconfigccl/spanconfigreconcilerccl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ go_test(
"//pkg/spanconfig",
"//pkg/spanconfig/spanconfigtestutils",
"//pkg/spanconfig/spanconfigtestutils/spanconfigtestcluster",
"//pkg/sql",
"//pkg/sql/sqlliveness/sqllivenesstestutils",
"//pkg/testutils",
"//pkg/testutils/datapathutils",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/spanconfig"
"github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigtestutils"
"github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigtestutils/spanconfigtestcluster"
"github.com/cockroachdb/cockroach/pkg/sql"
"github.com/cockroachdb/cockroach/pkg/sql/sqlliveness/sqllivenesstestutils"
"github.com/cockroachdb/cockroach/pkg/testutils"
"github.com/cockroachdb/cockroach/pkg/testutils/datapathutils"
Expand Down Expand Up @@ -106,6 +107,9 @@ func TestDataDriven(t *testing.T) {
Knobs: base.TestingKnobs{
JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(), // speeds up test
SpanConfig: scKnobs,
SQLExecutor: &sql.ExecutorTestingKnobs{
UseTransactionalDescIDGenerator: true,
},
},
},
})
Expand Down

0 comments on commit b1501c1

Please sign in to comment.