Skip to content

Commit bc94681

Browse files
committed
workloadccl/allccl: enable test tenants
Release note: None
1 parent d407a9e commit bc94681

File tree

2 files changed

+20
-24
lines changed

2 files changed

+20
-24
lines changed

pkg/ccl/workloadccl/allccl/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ go_test(
6060
"//pkg/testutils/skip",
6161
"//pkg/testutils/sqlutils",
6262
"//pkg/testutils/testcluster",
63-
"//pkg/util",
6463
"//pkg/util/bufalloc",
6564
"//pkg/util/leaktest",
6665
"//pkg/util/log",

pkg/ccl/workloadccl/allccl/all_test.go

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"github.com/cockroachdb/cockroach/pkg/testutils/serverutils"
2323
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
2424
"github.com/cockroachdb/cockroach/pkg/testutils/sqlutils"
25-
"github.com/cockroachdb/cockroach/pkg/util"
2625
"github.com/cockroachdb/cockroach/pkg/util/bufalloc"
2726
"github.com/cockroachdb/cockroach/pkg/util/leaktest"
2827
"github.com/cockroachdb/cockroach/pkg/util/log"
@@ -47,6 +46,13 @@ func TestAllRegisteredImportFixture(t *testing.T) {
4746
sqlMemoryPoolSize := int64(1000 << 20) // 1GiB
4847

4948
for _, meta := range workload.Registered() {
49+
if meta.Name == `workload_generator` {
50+
// This will take its schema generation data from flags at run time,
51+
// so static checks are not valid. (This is done separately from the
52+
// switch below to avoid calling gen.Tables() which would print an
53+
// error.)
54+
continue
55+
}
5056
meta := meta
5157
gen := meta.New()
5258
hasInitialData := len(gen.Tables()) != 0
@@ -60,15 +66,15 @@ func TestAllRegisteredImportFixture(t *testing.T) {
6066
continue
6167
}
6268

63-
// This test is big enough that it causes timeout issues under race, so only
64-
// run one workload. Doing any more than this doesn't get us enough to be
65-
// worth the hassle.
66-
if util.RaceEnabled && meta.Name != `bank` {
69+
// This test is big enough that it causes timeout issues under heavy
70+
// configs, so only run one workload. Doing any more than this doesn't
71+
// get us enough to be worth the hassle.
72+
if skip.Duress() && meta.Name != `bank` {
6773
continue
6874
}
6975

7076
switch meta.Name {
71-
case `startrek`, `roachmart`, `interleavedpartitioned`, `ttlbench`:
77+
case `startrek`, `roachmart`, `ttlbench`:
7278
// These don't work with IMPORT.
7379
continue
7480
case `tpch`:
@@ -85,9 +91,6 @@ func TestAllRegisteredImportFixture(t *testing.T) {
8591

8692
ctx := context.Background()
8793
s, db, _ := serverutils.StartServer(t, base.TestServerArgs{
88-
// The test tenant needs to be disabled for this test until
89-
// we address #75449.
90-
DefaultTestTenant: base.TODOTestTenantDisabled,
9194
UseDatabase: "d",
9295
SQLMemoryPoolSize: sqlMemoryPoolSize,
9396
})
@@ -120,10 +123,10 @@ func TestAllRegisteredSetup(t *testing.T) {
120123
continue
121124
}
122125

123-
// This test is big enough that it causes timeout issues under race, so only
124-
// run one workload. Doing any more than this doesn't get us enough to be
125-
// worth the hassle.
126-
if util.RaceEnabled && meta.Name != `bank` {
126+
// This test is big enough that it causes timeout issues under heavy
127+
// configs, so only run one workload. Doing any more than this doesn't
128+
// get us enough to be worth the hassle.
129+
if skip.Duress() && meta.Name != `bank` {
127130
continue
128131
}
129132

@@ -138,9 +141,6 @@ func TestAllRegisteredSetup(t *testing.T) {
138141
}); err != nil {
139142
t.Fatal(err)
140143
}
141-
case `interleavedpartitioned`:
142-
// This require a specific node locality setup.
143-
continue
144144
case `ttlbench`:
145145
continue
146146
case `vecann`:
@@ -155,15 +155,12 @@ func TestAllRegisteredSetup(t *testing.T) {
155155
t.Run(meta.Name, func(t *testing.T) {
156156
defer log.Scope(t).Close(t)
157157
ctx := context.Background()
158-
s, db, _ := serverutils.StartServer(t, base.TestServerArgs{
159-
// Need to disable the test tenant here until we resolve
160-
// #75449 as this test makes use of import through a fixture.
161-
DefaultTestTenant: base.TODOTestTenantDisabled,
162-
UseDatabase: "d",
158+
srv, db, _ := serverutils.StartServer(t, base.TestServerArgs{
159+
UseDatabase: "d",
163160
})
164-
defer s.Stopper().Stop(ctx)
161+
defer srv.Stopper().Stop(ctx)
165162
sqlutils.MakeSQLRunner(db).Exec(t, `CREATE DATABASE d`)
166-
sqlutils.MakeSQLRunner(db).Exec(t, `SET CLUSTER SETTING kv.range_merge.queue.enabled = false`)
163+
sqlutils.MakeSQLRunner(srv.SystemLayer().SQLConn(t)).Exec(t, `SET CLUSTER SETTING kv.range_merge.queue.enabled = false`)
167164

168165
var l workloadsql.InsertsDataLoader
169166
if _, err := workloadsql.Setup(ctx, db, gen, l); err != nil {

0 commit comments

Comments
 (0)