Skip to content

Commit

Permalink
tests: skip some tests that are OOM'ing under remote execution
Browse files Browse the repository at this point in the history
Epic: CRDB-8308
Release note: None
  • Loading branch information
rickystewart committed Dec 5, 2023
1 parent bd55d22 commit 337777f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/kv/kvserver/client_replica_backpressure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func TestBackpressureNotAppliedWhenReducingRangeSize(t *testing.T) {
defer log.Scope(t).Close(t)

skip.UnderRace(t, "takes >1m under race")
skip.UnderRemoteExecutionWithIssue(t, 113032, "probable OOM")

rRand, _ := randutil.NewTestRand()
ctx := context.Background()
Expand Down
1 change: 1 addition & 0 deletions pkg/sql/physicalplan/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ go_test(
"//pkg/testutils/distsqlutils",
"//pkg/testutils/physicalplanutils",
"//pkg/testutils/serverutils",
"//pkg/testutils/skip",
"//pkg/testutils/sqlutils",
"//pkg/testutils/testcluster",
"//pkg/util/leaktest",
Expand Down
3 changes: 3 additions & 0 deletions pkg/sql/physicalplan/fake_span_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/sql/sem/tree"
"github.com/cockroachdb/cockroach/pkg/testutils/physicalplanutils"
"github.com/cockroachdb/cockroach/pkg/testutils/serverutils"
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
"github.com/cockroachdb/cockroach/pkg/testutils/sqlutils"
"github.com/cockroachdb/cockroach/pkg/util/leaktest"
"github.com/cockroachdb/cockroach/pkg/util/log"
Expand All @@ -33,6 +34,8 @@ func TestFakeSpanResolver(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)

skip.UnderRemoteExecutionWithIssue(t, 115619, "probable OOM")

ctx := context.Background()
tc := serverutils.StartCluster(t, 3, base.TestClusterArgs{})
defer tc.Stopper().Stop(ctx)
Expand Down
2 changes: 2 additions & 0 deletions pkg/storage/pebble_file_registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,8 @@ func TestFileRegistryRollover(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)

skip.UnderRemoteExecutionWithIssue(t, 115617, "probable OOM")

const dir = "/mydb"
mem := vfs.NewMem()
require.NoError(t, mem.MkdirAll(dir, 0755))
Expand Down
1 change: 1 addition & 0 deletions pkg/testutils/lint/lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ func TestLint(t *testing.T) {
":!testutils/datapathutils/data_path.go", // For TEST_UNDECLARED_OUTPUT_DIR, REMOTE_EXEC
":!testutils/backup.go", // For BACKUP_TESTING_BUCKET
":!compose/compose_test.go", // For PATH.
":!testutils/skip/skip.go", // For REMOTE_EXEC.
},
},
} {
Expand Down
11 changes: 11 additions & 0 deletions pkg/testutils/skip/skip.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ package skip
import (
"flag"
"fmt"
"os"
"strings"
"testing"

Expand Down Expand Up @@ -198,6 +199,16 @@ func UnderBench() bool {
return f != nil && f.Value.String() != ""
}

// UnderRemoteExecution skips the given test under remote test execution.
func UnderRemoteExecutionWithIssue(t SkippableTest, githubIssueID int, args ...interface{}) {
t.Helper()
isRemote := os.Getenv("REMOTE_EXEC")
if len(isRemote) > 0 {
maybeSkip(t, withIssue("disabled under race", githubIssueID), args...)
}

}

func testConfig() string {
configs := []string{}
if Stress() {
Expand Down

0 comments on commit 337777f

Please sign in to comment.