From b5226c38b46d98624db303c487ef78bfef8cd8aa Mon Sep 17 00:00:00 2001
From: Shubham Dhama <shubham.dhama@cockroachlabs.com>
Date: Mon, 13 Jan 2025 19:27:52 +0530
Subject: [PATCH] workload: enable tenant testing for allccl_test

Since #75449 is fixed we can enable tenant testing here.

Informs: #138912
Epic: CRDB-38970
Release note: None
---
 pkg/ccl/workloadccl/allccl/all_test.go | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/pkg/ccl/workloadccl/allccl/all_test.go b/pkg/ccl/workloadccl/allccl/all_test.go
index 98d8167d118..e060f4a1857 100644
--- a/pkg/ccl/workloadccl/allccl/all_test.go
+++ b/pkg/ccl/workloadccl/allccl/all_test.go
@@ -85,9 +85,6 @@ func TestAllRegisteredImportFixture(t *testing.T) {
 
 			ctx := context.Background()
 			s, db, _ := serverutils.StartServer(t, base.TestServerArgs{
-				// The test tenant needs to be disabled for this test until
-				// we address #75449.
-				DefaultTestTenant: base.TODOTestTenantDisabled,
 				UseDatabase:       "d",
 				SQLMemoryPoolSize: sqlMemoryPoolSize,
 			})
@@ -149,14 +146,13 @@ func TestAllRegisteredSetup(t *testing.T) {
 			defer log.Scope(t).Close(t)
 			ctx := context.Background()
 			s, db, _ := serverutils.StartServer(t, base.TestServerArgs{
-				// Need to disable the test tenant here until we resolve
-				// #75449 as this test makes use of import through a fixture.
-				DefaultTestTenant: base.TODOTestTenantDisabled,
-				UseDatabase:       "d",
+				UseDatabase: "d",
 			})
 			defer s.Stopper().Stop(ctx)
 			sqlutils.MakeSQLRunner(db).Exec(t, `CREATE DATABASE d`)
-			sqlutils.MakeSQLRunner(db).Exec(t, `SET CLUSTER SETTING kv.range_merge.queue.enabled = false`)
+
+			systemDB := sqlutils.MakeSQLRunner(s.SystemLayer().SQLConn(t))
+			systemDB.Exec(t, `SET CLUSTER SETTING kv.range_merge.queue.enabled = false`)
 
 			var l workloadsql.InsertsDataLoader
 			if _, err := workloadsql.Setup(ctx, db, gen, l); err != nil {