Skip to content

Commit

Permalink
Merge #112165
Browse files Browse the repository at this point in the history
112165: streamingccl: remove uses of base.TODOTestTenantDisabled r=msbutler a=stevendanna

Almost all streamingccl manage tenants explicitly. In a few cases the test technically works in a secondary tenant, but I haven't gone out of my way to find more that might.

Informs #76378

Release note: None

Co-authored-by: Steven Danna <[email protected]>
  • Loading branch information
craig[bot] and stevendanna committed Oct 16, 2023
2 parents e431569 + dc5f39a commit e1ba9be
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 30 deletions.
4 changes: 1 addition & 3 deletions pkg/ccl/streamingccl/replicationtestutils/testutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,7 @@ func CreateServerArgs(args TenantStreamingClustersArgs) base.TestServerArgs {
}
}
return base.TestServerArgs{
// Test fails because it tries to set a cluster setting only accessible
// to system tenants. Tracked with #76378.
DefaultTestTenant: base.TODOTestTenantDisabled,
DefaultTestTenant: base.TestControlsTenantsExplicitly,
Knobs: base.TestingKnobs{
JobsTestingKnobs: defaultJobsTestingKnobs(),
DistSQL: &execinfra.TestingKnobs{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,7 @@ func TestPartitionedStreamReplicationClient(t *testing.T) {

h, cleanup := replicationtestutils.NewReplicationHelper(t,
base.TestServerArgs{
// Need to disable the test tenant until tenant-level restore is
// supported. Tracked with #76378.
DefaultTestTenant: base.TODOTestTenantDisabled,
DefaultTestTenant: base.TestControlsTenantsExplicitly,
Knobs: base.TestingKnobs{
JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func TestStreamIngestionJobWithRandomClient(t *testing.T) {
ServerArgs: base.TestServerArgs{
// Test hangs with test tenant. More investigation is required.
// Tracked with #76378.
DefaultTestTenant: base.TODOTestTenantDisabled,
DefaultTestTenant: base.TestControlsTenantsExplicitly,
Knobs: base.TestingKnobs{
TenantTestingKnobs: &sql.TenantTestingKnobs{
// Needed to pin down the ID of the replication target.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,7 @@ func TestCutoverBuiltin(t *testing.T) {

args := base.TestClusterArgs{
ServerArgs: base.TestServerArgs{
// Disable the test tenant as the test below looks for a
// streaming job assuming that it's within the system tenant.
// Tracked with #76378.
DefaultTestTenant: base.TODOTestTenantDisabled,
DefaultTestTenant: base.TestIsSpecificToStorageLayerAndNeedsASystemTenant,
Knobs: base.TestingKnobs{
JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(),
},
Expand Down Expand Up @@ -514,7 +511,6 @@ func TestCutoverFractionProgressed(t *testing.T) {
},
},
},
DefaultTestTenant: base.TODOTestTenantDisabled,
})
defer s.Stopper().Stop(ctx)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,13 @@ func TestStreamIngestionProcessor(t *testing.T) {
ctx := context.Background()

tc := testcluster.StartTestCluster(t, 1 /* nodes */, base.TestClusterArgs{
ServerArgs: base.TestServerArgs{DefaultTestTenant: base.TODOTestTenantDisabled},
ServerArgs: base.TestServerArgs{
// Perhaps it would be possible to make this
// run in a secondary tenant, but the test
// would need to be completely rewritten to be
// even further from real-world operation.
DefaultTestTenant: base.TestIsSpecificToStorageLayerAndNeedsASystemTenant,
},
})
defer tc.Stopper().Stop(ctx)
db := tc.Server(0).InternalDB().(descs.DB)
Expand Down
4 changes: 1 addition & 3 deletions pkg/ccl/streamingccl/streamproducer/producer_job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ func TestStreamReplicationProducerJob(t *testing.T) {
ctx := context.Background()
clusterArgs := base.TestClusterArgs{
ServerArgs: base.TestServerArgs{
// Test fails within a test tenant. More investigation
// is required. Tracked with #76378.
DefaultTestTenant: base.TODOTestTenantDisabled,
DefaultTestTenant: base.TestIsSpecificToStorageLayerAndNeedsASystemTenant,
Knobs: base.TestingKnobs{
JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(),
},
Expand Down
19 changes: 5 additions & 14 deletions pkg/ccl/streamingccl/streamproducer/replication_stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,7 @@ func TestReplicationStreamInitialization(t *testing.T) {
defer log.Scope(t).Close(t)

serverArgs := base.TestServerArgs{
// This test fails when run from within a test tenant. This is likely
// due to the lack of support for tenant streaming, but more
// investigation is required. Tracked with #76378.
DefaultTestTenant: base.TODOTestTenantDisabled,
DefaultTestTenant: base.TestControlsTenantsExplicitly,
Knobs: base.TestingKnobs{
JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(),
},
Expand Down Expand Up @@ -346,9 +343,7 @@ func TestStreamPartition(t *testing.T) {
defer log.Scope(t).Close(t)
h, cleanup := replicationtestutils.NewReplicationHelper(t,
base.TestServerArgs{
// Test fails within a test tenant. More investigation is required.
// Tracked with #76378.
DefaultTestTenant: base.TODOTestTenantDisabled,
DefaultTestTenant: base.TestControlsTenantsExplicitly,
})
defer cleanup()
testTenantName := roachpb.TenantName("test-tenant")
Expand Down Expand Up @@ -466,9 +461,7 @@ func TestStreamAddSSTable(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
h, cleanup := replicationtestutils.NewReplicationHelper(t, base.TestServerArgs{
// Test hangs when run within the default test tenant. Tracked with
// #76378.
DefaultTestTenant: base.TODOTestTenantDisabled,
DefaultTestTenant: base.TestControlsTenantsExplicitly,
})
defer cleanup()
testTenantName := roachpb.TenantName("test-tenant")
Expand Down Expand Up @@ -558,7 +551,7 @@ func TestCompleteStreamReplication(t *testing.T) {
Knobs: base.TestingKnobs{
JobsTestingKnobs: jobs.NewTestingKnobsWithShortIntervals(),
},
DefaultTestTenant: base.TODOTestTenantDisabled,
DefaultTestTenant: base.TestControlsTenantsExplicitly,
})
defer cleanup()
srcTenantID := serverutils.TestTenantID()
Expand Down Expand Up @@ -626,9 +619,7 @@ func TestStreamDeleteRange(t *testing.T) {
skip.UnderStressRace(t, "disabled under stress and race")

h, cleanup := replicationtestutils.NewReplicationHelper(t, base.TestServerArgs{
// Test hangs when run within the default test tenant. Tracked with
// #76378.
DefaultTestTenant: base.TODOTestTenantDisabled,
DefaultTestTenant: base.TestControlsTenantsExplicitly,
})
defer cleanup()
testTenantName := roachpb.TenantName("test-tenant")
Expand Down

0 comments on commit e1ba9be

Please sign in to comment.