Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 616d37d

Browse files
authored
chore(cli): skip scaletest tests when race detector enabled (coder#16033)
Fixes coder/internal#265 This isn't an ideal solution but the race detector tends to make these flake out.
1 parent 1364368 commit 616d37d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

cli/exp_scaletest_test.go

+24
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ import (
1818
func TestScaleTestCreateWorkspaces(t *testing.T) {
1919
t.Parallel()
2020

21+
if testutil.RaceEnabled() {
22+
t.Skip("Skipping due to race detector")
23+
}
24+
2125
// This test only validates that the CLI command accepts known arguments.
2226
// More thorough testing is done in scaletest/createworkspaces/run_test.go.
2327
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitLong)
@@ -65,6 +69,10 @@ func TestScaleTestCreateWorkspaces(t *testing.T) {
6569
func TestScaleTestWorkspaceTraffic(t *testing.T) {
6670
t.Parallel()
6771

72+
if testutil.RaceEnabled() {
73+
t.Skip("Skipping due to race detector")
74+
}
75+
6876
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium)
6977
defer cancelFunc()
7078

@@ -95,6 +103,10 @@ func TestScaleTestWorkspaceTraffic(t *testing.T) {
95103
func TestScaleTestWorkspaceTraffic_Template(t *testing.T) {
96104
t.Parallel()
97105

106+
if testutil.RaceEnabled() {
107+
t.Skip("Skipping due to race detector")
108+
}
109+
98110
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium)
99111
defer cancelFunc()
100112

@@ -120,6 +132,10 @@ func TestScaleTestWorkspaceTraffic_Template(t *testing.T) {
120132
func TestScaleTestWorkspaceTraffic_TargetWorkspaces(t *testing.T) {
121133
t.Parallel()
122134

135+
if testutil.RaceEnabled() {
136+
t.Skip("Skipping due to race detector")
137+
}
138+
123139
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium)
124140
defer cancelFunc()
125141

@@ -145,6 +161,10 @@ func TestScaleTestWorkspaceTraffic_TargetWorkspaces(t *testing.T) {
145161
func TestScaleTestCleanup_Template(t *testing.T) {
146162
t.Parallel()
147163

164+
if testutil.RaceEnabled() {
165+
t.Skip("Skipping due to race detector")
166+
}
167+
148168
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium)
149169
defer cancelFunc()
150170

@@ -169,6 +189,10 @@ func TestScaleTestCleanup_Template(t *testing.T) {
169189
// This test just validates that the CLI command accepts its known arguments.
170190
func TestScaleTestDashboard(t *testing.T) {
171191
t.Parallel()
192+
if testutil.RaceEnabled() {
193+
t.Skip("Skipping due to race detector")
194+
}
195+
172196
t.Run("MinWait", func(t *testing.T) {
173197
t.Parallel()
174198
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitShort)

0 commit comments

Comments
 (0)