Skip to content

Commit 0ae31e5

Browse files
craig[bot]spilchenDarrylWong
committed
153270: sql/inspect: skip flaky statement timeout test under race r=spilchen a=spilchen The TestInspectJobImplicitTxnSemantics statement_timeout subtest was failing intermittently under race conditions. The test expects an INSPECT job to start and succeed even when the triggering EXPERIMENTAL SCRUB statement times out after 1 second, but on slow machines with race detection enabled, the job creation may not complete before the timeout. Fixes #153164 Release note: None Epic: None 153275: roachtest: fix roachperf metric bugs r=golgeek a=DarrylWong Release note: none Epic: none Fixes: none 153278: roachtest: fix live migration error message r=golgeek a=DarrylWong Previously the error reporting would list host error vms, instead of live migration vms. This change fixes that. Epic: none Fixes: none Release note: none 153288: roachtest: increase timeout for hibernate test r=spilchen a=spilchen We noticed that on s390x the hibernate test can timeout after 5 hours. There are also several runs that succeeded but came close to timing out. We are going to bump the timeout to give that platform more chance to finish the test. Fixes #153029 Release note: none Epic: none Co-authored-by: Matt Spilchen <[email protected]> Co-authored-by: DarrylWong <[email protected]>
5 parents c425c02 + 6d59159 + 5445d58 + c497157 + 2dd3e92 commit 0ae31e5

File tree

6 files changed

+13
-4
lines changed

6 files changed

+13
-4
lines changed

pkg/cmd/roachtest/roachtestutil/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func GetMeanOverLastN(n int, items []float64) float64 {
198198
// Usage: ROACHTEST_PERF_WORKLOAD_DURATION="5m".
199199
const EnvWorkloadDurationFlag = "ROACHTEST_PERF_WORKLOAD_DURATION"
200200

201-
var workloadDurationRegex = regexp.MustCompile(`^\d+[mhsMHS]$`)
201+
var workloadDurationRegex = regexp.MustCompile(`^\d+[mhs]$`)
202202

203203
// GetEnvWorkloadDurationValueOrDefault validates EnvWorkloadDurationFlag and
204204
// returns value set if valid else returns default duration.

pkg/cmd/roachtest/test_runner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ func (r *testRunner) runTest(
12611261
if liveMigrationVMNames != "" {
12621262
failureMsg = fmt.Sprintf("VMs had live migrations during the test run: %s\n\n**Other Failures:**\n%s", liveMigrationVMNames, failureMsg)
12631263
t.resetFailures()
1264-
t.Error(liveMigrationError(hostErrorVMNames))
1264+
t.Error(liveMigrationError(liveMigrationVMNames))
12651265
}
12661266

12671267
output := fmt.Sprintf("%s\ntest artifacts and logs in: %s", failureMsg, t.ArtifactsDir())

pkg/cmd/roachtest/tests/cdc_bench.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ func registerCDCBench(r registry.Registry) {
7878
if len(histograms.Summaries) != 1 {
7979
return nil, errors.Errorf("expected exactly 1 histogram summary, got %d", len(histograms.Summaries))
8080
}
81+
// CDC scan tests export the scan rate (rows per second) as a single
82+
// duration value in nanoseconds, set as the upper bound of the histogram.
83+
// This convoluted scheme was cargo-culted from the restore test.
8184
scanRate = float64(histograms.Summaries[0].HighestTrackableValue) / float64(time.Second)
8285

8386
// Add scan rate metric (higher is better)

pkg/cmd/roachtest/tests/hibernate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ func registerHibernate(r registry.Registry, opt hibernateOptions) {
251251
NativeLibs: registry.LibGEOS,
252252
CompatibleClouds: registry.AllExceptAWS,
253253
Suites: registry.Suites(registry.Nightly, registry.ORM),
254-
Timeout: 5 * time.Hour,
254+
Timeout: 6 * time.Hour,
255255
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
256256
runHibernate(ctx, t, c)
257257
},

pkg/sql/inspect/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ go_test(
7979
"//pkg/sql/sessiondata",
8080
"//pkg/testutils",
8181
"//pkg/testutils/serverutils",
82+
"//pkg/testutils/skip",
8283
"//pkg/testutils/sqlutils",
8384
"//pkg/testutils/testcluster",
8485
"//pkg/util/leaktest",

pkg/sql/inspect/inspect_job_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"github.com/cockroachdb/cockroach/pkg/sql"
1717
"github.com/cockroachdb/cockroach/pkg/testutils"
1818
"github.com/cockroachdb/cockroach/pkg/testutils/serverutils"
19+
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
1920
"github.com/cockroachdb/cockroach/pkg/testutils/sqlutils"
2021
"github.com/cockroachdb/cockroach/pkg/util/leaktest"
2122
"github.com/cockroachdb/cockroach/pkg/util/log"
@@ -83,14 +84,18 @@ func TestInspectJobImplicitTxnSemantics(t *testing.T) {
8384
onStartError error
8485
expectedErrRegex string
8586
expectedJobStatus string
87+
skipUnderRace bool
8688
}{
8789
{desc: "inspect success", expectedJobStatus: "succeeded"},
8890
{desc: "inspect failure", onStartError: errors.Newf("inspect validation error"),
8991
expectedErrRegex: "inspect validation error", expectedJobStatus: "failed"},
9092
// Note: avoiding small statement timeouts, as this can impact the ability to reset.
9193
{desc: "statement timeout", setupSQL: "SET statement_timeout = '1s'", tearDownSQL: "RESET statement_timeout",
92-
pauseAtStart: true, expectedErrRegex: "canceled", expectedJobStatus: "succeeded"},
94+
pauseAtStart: true, expectedErrRegex: "canceled", expectedJobStatus: "succeeded", skipUnderRace: true},
9395
} {
96+
if tc.skipUnderRace {
97+
skip.UnderRace(t, "timing dependent")
98+
}
9499
t.Run(tc.desc, func(t *testing.T) {
95100
// Run in a closure so that we run teardown before verifying job status
96101
func() {

0 commit comments

Comments
 (0)