Skip to content

Commit 7c40dd2

Browse files
committedMar 14, 2025·
sql: enable shared-process mode tenant testing for TestUnsplitRanges
I opened issue #142388 to track the work for enabling external-process mode testing, as it turned out to be a non-trivial effort.
1 parent a38e6cd commit 7c40dd2

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed
 

‎pkg/base/test_server_args.go

+13
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,19 @@ func TestIsForStuffThatShouldWorkWithSharedProcessModeButDoesntYet(
526526
//
527527
// It should link to a github issue with label C-investigation.
528528
func TestSkippedForExternalModeDueToPerformance(issueNumber int) DefaultTestTenantOptions {
529+
return testSkippedForExternalProcessMode(issueNumber)
530+
}
531+
532+
// TestDoesNotWorkWithExternalProcessMode disables selecting the external
533+
// process virtual cluster for tests that are not functional in that mode and
534+
// require further investigation. Any test using this function should reference
535+
// a GitHub issue tagged with "C-investigation" describing the underlying
536+
// problem.
537+
func TestDoesNotWorkWithExternalProcessMode(issueNumber int) DefaultTestTenantOptions {
538+
return testSkippedForExternalProcessMode(issueNumber)
539+
}
540+
541+
func testSkippedForExternalProcessMode(issueNumber int) DefaultTestTenantOptions {
529542
return DefaultTestTenantOptions{
530543
testBehavior: ttSharedProcess,
531544
allowAdditionalTenants: true,

‎pkg/sql/unsplit_range_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"errors"
1313
"testing"
1414

15+
"github.com/cockroachdb/cockroach/pkg/base"
1516
"github.com/cockroachdb/cockroach/pkg/jobs"
1617
"github.com/cockroachdb/cockroach/pkg/keys"
1718
"github.com/cockroachdb/cockroach/pkg/kv"
@@ -269,7 +270,8 @@ func TestUnsplitRanges(t *testing.T) {
269270

270271
ctx := context.Background()
271272
run := func(t *testing.T, tc testCase) {
272-
params, _ := createTestServerParams()
273+
params, _ := createTestServerParamsAllowTenants()
274+
params.DefaultTestTenant = base.TestDoesNotWorkWithExternalProcessMode(142388)
273275
params.Knobs.JobsTestingKnobs = jobs.NewTestingKnobsWithShortIntervals()
274276
params.Knobs.GCJob = &sql.GCJobTestingKnobs{
275277
SkipWaitingForMVCCGC: true,

0 commit comments

Comments
 (0)
Please sign in to comment.