mirror of
https://github.com/coder/coder.git
synced 2025-03-15 19:19:58 +00:00
chore(cli): skip scaletest tests when race detector enabled (#16033)
Fixes https://github.com/coder/internal/issues/265 This isn't an ideal solution but the race detector tends to make these flake out.
This commit is contained in:
@ -18,6 +18,10 @@ import (
|
|||||||
func TestScaleTestCreateWorkspaces(t *testing.T) {
|
func TestScaleTestCreateWorkspaces(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
if testutil.RaceEnabled() {
|
||||||
|
t.Skip("Skipping due to race detector")
|
||||||
|
}
|
||||||
|
|
||||||
// This test only validates that the CLI command accepts known arguments.
|
// This test only validates that the CLI command accepts known arguments.
|
||||||
// More thorough testing is done in scaletest/createworkspaces/run_test.go.
|
// More thorough testing is done in scaletest/createworkspaces/run_test.go.
|
||||||
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitLong)
|
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitLong)
|
||||||
@ -65,6 +69,10 @@ func TestScaleTestCreateWorkspaces(t *testing.T) {
|
|||||||
func TestScaleTestWorkspaceTraffic(t *testing.T) {
|
func TestScaleTestWorkspaceTraffic(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
if testutil.RaceEnabled() {
|
||||||
|
t.Skip("Skipping due to race detector")
|
||||||
|
}
|
||||||
|
|
||||||
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium)
|
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium)
|
||||||
defer cancelFunc()
|
defer cancelFunc()
|
||||||
|
|
||||||
@ -95,6 +103,10 @@ func TestScaleTestWorkspaceTraffic(t *testing.T) {
|
|||||||
func TestScaleTestWorkspaceTraffic_Template(t *testing.T) {
|
func TestScaleTestWorkspaceTraffic_Template(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
if testutil.RaceEnabled() {
|
||||||
|
t.Skip("Skipping due to race detector")
|
||||||
|
}
|
||||||
|
|
||||||
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium)
|
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium)
|
||||||
defer cancelFunc()
|
defer cancelFunc()
|
||||||
|
|
||||||
@ -120,6 +132,10 @@ func TestScaleTestWorkspaceTraffic_Template(t *testing.T) {
|
|||||||
func TestScaleTestWorkspaceTraffic_TargetWorkspaces(t *testing.T) {
|
func TestScaleTestWorkspaceTraffic_TargetWorkspaces(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
if testutil.RaceEnabled() {
|
||||||
|
t.Skip("Skipping due to race detector")
|
||||||
|
}
|
||||||
|
|
||||||
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium)
|
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium)
|
||||||
defer cancelFunc()
|
defer cancelFunc()
|
||||||
|
|
||||||
@ -145,6 +161,10 @@ func TestScaleTestWorkspaceTraffic_TargetWorkspaces(t *testing.T) {
|
|||||||
func TestScaleTestCleanup_Template(t *testing.T) {
|
func TestScaleTestCleanup_Template(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
|
if testutil.RaceEnabled() {
|
||||||
|
t.Skip("Skipping due to race detector")
|
||||||
|
}
|
||||||
|
|
||||||
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium)
|
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitMedium)
|
||||||
defer cancelFunc()
|
defer cancelFunc()
|
||||||
|
|
||||||
@ -169,6 +189,10 @@ func TestScaleTestCleanup_Template(t *testing.T) {
|
|||||||
// This test just validates that the CLI command accepts its known arguments.
|
// This test just validates that the CLI command accepts its known arguments.
|
||||||
func TestScaleTestDashboard(t *testing.T) {
|
func TestScaleTestDashboard(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
if testutil.RaceEnabled() {
|
||||||
|
t.Skip("Skipping due to race detector")
|
||||||
|
}
|
||||||
|
|
||||||
t.Run("MinWait", func(t *testing.T) {
|
t.Run("MinWait", func(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitShort)
|
ctx, cancelFunc := context.WithTimeout(context.Background(), testutil.WaitShort)
|
||||||
|
Reference in New Issue
Block a user