Skip to content

Commit 164a4ba

Browse files
craig[bot]DarrylWong
andcommitted
Merge #149342
149342: roachtest: disable cluster reuse for sysbench/postgres* tests r=tbg a=DarrylWong Installing postgres creates a lot of directories that are not properly cleaned up by a cluster wipe. Disable cluster reuse to avoid any side effects. Release note: none Fixes: #149127 Fixes: #149126 Fixes: #149128 Co-authored-by: DarrylWong <[email protected]>
2 parents 12469e1 + 5715e8a commit 164a4ba

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pkg/cmd/roachtest/tests/sysbench.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ func registerSysbench(r registry.Registry) {
406406
benchname += opts.extra.nameSuffix
407407
}
408408

409-
spec := registry.TestSpec{
409+
crdbSpec := registry.TestSpec{
410410
Name: fmt.Sprintf("%s/%s/nodes=%d/cpu=%d/conc=%d", benchname, w, d.n, d.cpus, conc),
411411
Benchmark: true,
412412
Owner: registry.OwnerTestEng,
@@ -418,15 +418,19 @@ func registerSysbench(r registry.Registry) {
418418
runSysbench(ctx, t, c, opts)
419419
},
420420
}
421-
r.Add(spec)
421+
r.Add(crdbSpec)
422422

423423
// Add a variant of the single-node tests that uses PostgreSQL instead of CockroachDB.
424424
if d.n == 1 {
425425
pgOpts := opts
426426
pgOpts.usePostgres = true
427-
pgSpec := spec
427+
pgSpec := crdbSpec
428428
pgSpec.Name = fmt.Sprintf("%s/%s/postgres/cpu=%d/conc=%d", benchname, w, d.cpus, conc)
429429
pgSpec.Suites = registry.Suites(registry.Weekly)
430+
// Postgres installation creates a lot of directories not cleaned up by
431+
// cluster wipe. To avoid side effects on subsequent postgres sysbench
432+
// runs, don't reuse the cluster.
433+
pgSpec.Cluster.ReusePolicy = spec.ReusePolicyNone{}
430434
pgSpec.TestSelectionOptOutSuites = registry.Suites(registry.Weekly)
431435
pgSpec.Run = func(ctx context.Context, t test.Test, c cluster.Cluster) {
432436
runSysbench(ctx, t, c, pgOpts)

0 commit comments

Comments
 (0)