@@ -67,8 +67,7 @@ func TestDataDriven(t *testing.T) {
6767 datadriven .Walk (t , datapathutils .TestDataPath (t ), func (t * testing.T , path string ) {
6868 tc := testcluster .StartTestCluster (t , 1 , base.TestClusterArgs {
6969 ServerArgs : base.TestServerArgs {
70- // Fails with nil pointer dereference. Tracked with #76378 and #106818.
71- DefaultTestTenant : base .TestDoesNotWorkWithSecondaryTenantsButWeDontKnowWhyYet (106818 ),
70+ DefaultTestTenant : base .TestControlsTenantsExplicitly ,
7271 Knobs : base.TestingKnobs {
7372 SpanConfig : scKnobs ,
7473 },
@@ -79,15 +78,10 @@ func TestDataDriven(t *testing.T) {
7978 spanConfigTestCluster := spanconfigtestcluster .NewHandle (t , tc , scKnobs )
8079 defer spanConfigTestCluster .Cleanup ()
8180
82- var tenant * spanconfigtestcluster.Tenant
83- if strings .Contains (path , "tenant" ) {
84- tenantID := roachpb .MustMakeTenantID (10 )
85- tenant = spanConfigTestCluster .InitializeTenant (ctx , tenantID )
86- spanConfigTestCluster .AllowSecondaryTenantToSetZoneConfigurations (t , tenantID )
87- spanConfigTestCluster .EnsureTenantCanSetZoneConfigurationsOrFatal (t , tenant )
88- } else {
89- tenant = spanConfigTestCluster .InitializeTenant (ctx , roachpb .SystemTenantID )
90- }
81+ tenantID := roachpb .MustMakeTenantID (10 )
82+ tenant := spanConfigTestCluster .InitializeTenant (ctx , tenantID )
83+ spanConfigTestCluster .AllowSecondaryTenantToSetZoneConfigurations (t , tenantID )
84+ spanConfigTestCluster .EnsureTenantCanSetZoneConfigurationsOrFatal (t , tenant )
9185
9286 // TODO(irfansharif): Expose this through the test harness once we integrate
9387 // it into the schema changer.
@@ -119,7 +113,8 @@ func TestDataDriven(t *testing.T) {
119113 var dbName , tbName string
120114 d .ScanArgs (t , "database" , & dbName )
121115 d .ScanArgs (t , "table" , & tbName )
122- objID = tenant .LookupTableByName (ctx , dbName , tbName ).GetID ()
116+ tbl := tenant .LookupTableByName (ctx , dbName , tbName )
117+ objID = tbl .GetID ()
123118 default :
124119 d .Fatalf (t , "insufficient/improper args (%v) provided to split" , d .CmdArgs )
125120 }
0 commit comments