From 392b1e9e2ca8e71a67f44e937bed43072ee8baf5 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Fri, 3 Jan 2025 18:55:56 +0000 Subject: [PATCH] chore(cli): skip scaletest tests when race detector enabled --- cli/exp_scaletest_test.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/cli/exp_scaletest_test.go b/cli/exp_scaletest_test.go index 27f1adaac6c7d..afcd213fc9d00 100644 --- a/cli/exp_scaletest_test.go +++ b/cli/exp_scaletest_test.go @@ -18,6 +18,10 @@ import ( func TestScaleTestCreateWorkspaces(t *testing.T) { t.Parallel() + if testutil.RaceEnabled() { + t.Skip("Skipping due to race detector") + } + // This test only validates that the CLI command accepts known arguments. // More thorough testing is done in scaletest/createworkspaces/run_test.go. ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitLong) @@ -65,6 +69,10 @@ func TestScaleTestCreateWorkspaces(t *testing.T) { func TestScaleTestWorkspaceTraffic(t *testing.T) { t.Parallel() + if testutil.RaceEnabled() { + t.Skip("Skipping due to race detector") + } + ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium) defer cancelFunc() @@ -95,6 +103,10 @@ func TestScaleTestWorkspaceTraffic(t *testing.T) { func TestScaleTestWorkspaceTraffic_Template(t *testing.T) { t.Parallel() + if testutil.RaceEnabled() { + t.Skip("Skipping due to race detector") + } + ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium) defer cancelFunc() @@ -120,6 +132,10 @@ func TestScaleTestWorkspaceTraffic_Template(t *testing.T) { func TestScaleTestWorkspaceTraffic_TargetWorkspaces(t *testing.T) { t.Parallel() + if testutil.RaceEnabled() { + t.Skip("Skipping due to race detector") + } + ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium) defer cancelFunc() @@ -145,6 +161,10 @@ func TestScaleTestWorkspaceTraffic_TargetWorkspaces(t *testing.T) { func TestScaleTestCleanup_Template(t *testing.T) { t.Parallel() + if testutil.RaceEnabled() { + t.Skip("Skipping due to race detector") + } + ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium) defer cancelFunc() @@ -169,6 +189,10 @@ func TestScaleTestCleanup_Template(t *testing.T) { // This test just validates that the CLI command accepts its known arguments. func TestScaleTestDashboard(t *testing.T) { t.Parallel() + if testutil.RaceEnabled() { + t.Skip("Skipping due to race detector") + } + t.Run("MinWait", func(t *testing.T) { t.Parallel() ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitShort)