Skip to content

Commit 3c43216

Browse files
authored
fix: remove Parallel() call after timeout context (#10203)
Fixes test flake seen here: https://github.com/coder/coder/runs/17562370632 It's inherently flaky to create a context with a timeout and then later call `t.Parallel()` since it causes the test to wait until all non-parallel tests have completed before resuming execution. By the time execution has resumed, the context may have expired. The amount of time before resuming is dependent on machine resources and number of test cases, which are inherently variable.
1 parent 4452a14 commit 3c43216

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

enterprise/coderd/templates_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,8 @@ func TestTemplates(t *testing.T) {
281281
for _, c := range cases {
282282
c := c
283283

284+
// nolint: paralleltest // context is from parent t.Run
284285
t.Run(c.Name, func(t *testing.T) {
285-
t.Parallel()
286-
287286
_, err := client.UpdateTemplateMeta(ctx, template.ID, codersdk.UpdateTemplateMeta{
288287
Name: template.Name,
289288
DisplayName: template.DisplayName,

0 commit comments

Comments
 (0)