From 5e882894935d7264ce8f082eb22f9eb556cc0224 Mon Sep 17 00:00:00 2001 From: Cian Johnston Date: Thu, 9 Jan 2025 09:14:20 +0000 Subject: [PATCH] chore(enterprise/coderd): conditionally disable parallelism on windows (#16072) Fixes https://github.com/coder/internal/issues/266 --- enterprise/coderd/workspaces_test.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/enterprise/coderd/workspaces_test.go b/enterprise/coderd/workspaces_test.go index fb5d0eeea8..17685df83b 100644 --- a/enterprise/coderd/workspaces_test.go +++ b/enterprise/coderd/workspaces_test.go @@ -6,6 +6,7 @@ import ( "database/sql" "fmt" "net/http" + "runtime" "sync/atomic" "testing" "time" @@ -1398,8 +1399,12 @@ func TestTemplateDoesNotAllowUserAutostop(t *testing.T) { // real Terraform provisioner and validate that the workspace is created // successfully. The workspace itself does not specify any resources, and // this is fine. +// nolint:paralleltest // this test tends to time out on windows runners +// when run in parallel func TestWorkspaceTagsTerraform(t *testing.T) { - t.Parallel() + if runtime.GOOS != "windows" { + t.Parallel() + } mainTfTemplate := ` terraform { @@ -1528,7 +1533,9 @@ func TestWorkspaceTagsTerraform(t *testing.T) { } { tc := tc t.Run(tc.name, func(t *testing.T) { - t.Parallel() + if runtime.GOOS != "windows" { + t.Parallel() + } ctx := testutil.Context(t, testutil.WaitSuperLong) client, owner := coderdenttest.New(t, &coderdenttest.Options{