Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jobs,application_api: replace calls to skip.Stress with skip.Duress #118789

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/jobs/registry_external_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ func TestWaitWithRetryableError(t *testing.T) {
registry.WaitForJobs(
ctx, []jobspb.JobID{id},
))
if !skip.Stress() {
if !skip.Duress() {
require.Equalf(t, int64(targetNumberOfRetries), numberOfTimesDetected.Load(), "jobs query did not retry")
} else {
// For stress be lenient since we are relying on timing for leasing
Expand Down
20 changes: 10 additions & 10 deletions pkg/server/application_api/sql_stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ import (
"github.com/stretchr/testify/require"
)

// additionalTimeoutUnderStress is the additional timeout to use for the http
// additionalTimeoutUnderDuress is the additional timeout to use for the http
// client if under stress.
const additionalTimeoutUnderStress = 30 * time.Second
const additionalTimeoutUnderDuress = 30 * time.Second

func TestStatusAPICombinedTransactions(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)

// Increase the timeout for the http client if under stress.
additionalTimeout := 0 * time.Second
if skip.Stress() {
additionalTimeout = additionalTimeoutUnderStress
if skip.Duress() {
additionalTimeout = additionalTimeoutUnderDuress
}

var params base.TestServerArgs
Expand Down Expand Up @@ -393,8 +393,8 @@ func TestStatusAPIStatements(t *testing.T) {

// Increase the timeout for the http client if under stress.
additionalTimeout := 0 * time.Second
if skip.Stress() {
additionalTimeout = additionalTimeoutUnderStress
if skip.Duress() {
additionalTimeout = additionalTimeoutUnderDuress
}

// Aug 30 2021 19:50:00 GMT+0000
Expand Down Expand Up @@ -520,8 +520,8 @@ func TestStatusAPICombinedStatementsTotalLatency(t *testing.T) {
skip.UnderRace(t, "test is too slow to run under race")
// Increase the timeout for the http client if under stress.
additionalTimeout := 0 * time.Second
if skip.Stress() {
additionalTimeout = additionalTimeoutUnderStress
if skip.Duress() {
additionalTimeout = additionalTimeoutUnderDuress
}

sqlStatsKnobs := sqlstats.CreateTestingKnobs()
Expand Down Expand Up @@ -676,8 +676,8 @@ func TestStatusAPICombinedStatementsWithFullScans(t *testing.T) {

// Increase the timeout for the http client if under stress.
additionalTimeout := 0 * time.Second
if skip.Stress() {
additionalTimeout = additionalTimeoutUnderStress
if skip.Duress() {
additionalTimeout = additionalTimeoutUnderDuress
}
skip.UnderStressRace(t, "test is too slow to run under stressrace")

Expand Down
Loading