Skip to content

Commit c576bae

Browse files
craig[bot]knz
andcommitted
106844: multitenantccl: remove uses of `TODOTestTenantDisabled` r=yuzefovich a=knz Informs cockroachdb#76378. Epic: CRDB-18499 Co-authored-by: Raphael 'kena' Poss <[email protected]>
2 parents b4dfdc0 + 2ded6ee commit c576bae

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

pkg/ccl/multitenantccl/tenantcapabilitiesccl/capabilities_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func TestDataDriven(t *testing.T) {
7171

7272
tc := testcluster.StartTestCluster(t, 1, base.TestClusterArgs{
7373
ServerArgs: base.TestServerArgs{
74-
DefaultTestTenant: base.TODOTestTenantDisabled, // We'll create a tenant ourselves.
74+
DefaultTestTenant: base.TestControlsTenantsExplicitly,
7575
Knobs: base.TestingKnobs{
7676
TenantCapabilitiesTestingKnobs: &tenantcapabilities.TestingKnobs{
7777
WatcherTestingKnobs: &tenantcapabilitieswatcher.TestingKnobs{

pkg/ccl/multitenantccl/tenantcostclient/query_ru_estimate_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func TestEstimateQueryRUConsumption(t *testing.T) {
6464

6565
params := base.TestServerArgs{
6666
Settings: st,
67-
DefaultTestTenant: base.TODOTestTenantDisabled,
67+
DefaultTestTenant: base.TestControlsTenantsExplicitly,
6868
}
6969

7070
s, mainDB, _ := serverutils.StartServer(t, params)

pkg/ccl/multitenantccl/tenantcostclient/tenant_side_test.go

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ import (
6262
"github.com/cockroachdb/datadriven"
6363
"github.com/cockroachdb/errors"
6464
"github.com/stretchr/testify/require"
65-
"gopkg.in/yaml.v2"
65+
yaml "gopkg.in/yaml.v2"
6666
)
6767

6868
// TestDataDriven tests the tenant-side cost controller in an isolated setting.
@@ -874,7 +874,7 @@ func TestConsumption(t *testing.T) {
874874
defer leaktest.AfterTest(t)()
875875
defer log.Scope(t).Close(t)
876876

877-
hostServer, _, _ := serverutils.StartServer(t, base.TestServerArgs{DefaultTestTenant: base.TODOTestTenantDisabled})
877+
hostServer, _, _ := serverutils.StartServer(t, base.TestServerArgs{DefaultTestTenant: base.TestControlsTenantsExplicitly})
878878
defer hostServer.Stopper().Stop(context.Background())
879879

880880
st := cluster.MakeTestingClusterSettings()
@@ -944,7 +944,8 @@ func TestSQLLivenessExemption(t *testing.T) {
944944

945945
// This test fails when run with the default test tenant. Disabling and
946946
// tracking with #76378.
947-
hostServer, hostDB, hostKV := serverutils.StartServer(t, base.TestServerArgs{DefaultTestTenant: base.TODOTestTenantDisabled})
947+
hostServer, hostDB, hostKV := serverutils.StartServer(t,
948+
base.TestServerArgs{DefaultTestTenant: base.TestControlsTenantsExplicitly})
948949
defer hostServer.Stopper().Stop(context.Background())
949950

950951
tenantID := serverutils.TestTenantID()
@@ -1011,7 +1012,10 @@ func TestScheduledJobsConsumption(t *testing.T) {
10111012
stats.AutomaticStatisticsOnSystemTables.Override(ctx, &st.SV, false)
10121013
tenantcostclient.TargetPeriodSetting.Override(ctx, &st.SV, time.Millisecond*20)
10131014

1014-
hostServer, _, _ := serverutils.StartServer(t, base.TestServerArgs{DefaultTestTenant: base.TODOTestTenantDisabled, Settings: st})
1015+
hostServer, _, _ := serverutils.StartServer(t, base.TestServerArgs{
1016+
DefaultTestTenant: base.TestControlsTenantsExplicitly,
1017+
Settings: st,
1018+
})
10151019
defer hostServer.Stopper().Stop(ctx)
10161020

10171021
testProvider := newTestProvider()
@@ -1095,7 +1099,9 @@ func TestConsumptionChangefeeds(t *testing.T) {
10951099
defer leaktest.AfterTest(t)()
10961100
defer log.Scope(t).Close(t)
10971101

1098-
hostServer, hostDB, _ := serverutils.StartServer(t, base.TestServerArgs{DefaultTestTenant: base.TODOTestTenantDisabled})
1102+
hostServer, hostDB, _ := serverutils.StartServer(t, base.TestServerArgs{
1103+
DefaultTestTenant: base.TestControlsTenantsExplicitly,
1104+
})
10991105
defer hostServer.Stopper().Stop(context.Background())
11001106
if _, err := hostDB.Exec("SET CLUSTER SETTING kv.rangefeed.enabled = true"); err != nil {
11011107
t.Fatalf("changefeed setup failed: %s", err.Error())
@@ -1165,8 +1171,7 @@ func TestConsumptionExternalStorage(t *testing.T) {
11651171
dir, dirCleanupFn := testutils.TempDir(t)
11661172
defer dirCleanupFn()
11671173
hostServer, hostDB, _ := serverutils.StartServer(t, base.TestServerArgs{
1168-
// Test fails when run within the default tenant. Tracked with #76378.
1169-
DefaultTestTenant: base.TODOTestTenantDisabled,
1174+
DefaultTestTenant: base.TestControlsTenantsExplicitly,
11701175
ExternalIODir: dir,
11711176
})
11721177
defer hostServer.Stopper().Stop(context.Background())
@@ -1272,7 +1277,7 @@ func BenchmarkExternalIOAccounting(b *testing.B) {
12721277

12731278
hostServer, hostSQL, _ := serverutils.StartServer(b,
12741279
base.TestServerArgs{
1275-
DefaultTestTenant: base.TODOTestTenantDisabled,
1280+
DefaultTestTenant: base.TestControlsTenantsExplicitly,
12761281
})
12771282
defer hostServer.Stopper().Stop(context.Background())
12781283

@@ -1413,7 +1418,7 @@ func TestRUSettingsChanged(t *testing.T) {
14131418
ctx := context.Background()
14141419

14151420
params := base.TestServerArgs{
1416-
DefaultTestTenant: base.TODOTestTenantDisabled,
1421+
DefaultTestTenant: base.TestControlsTenantsExplicitly,
14171422
}
14181423

14191424
s, mainDB, _ := serverutils.StartServer(t, params)

0 commit comments

Comments
 (0)