mirror of
https://github.com/coder/coder.git
synced 2025-07-23 21:32:07 +00:00
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.
This commit is contained in:
@ -281,9 +281,8 @@ func TestTemplates(t *testing.T) {
|
||||
for _, c := range cases {
|
||||
c := c
|
||||
|
||||
// nolint: paralleltest // context is from parent t.Run
|
||||
t.Run(c.Name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
_, err := client.UpdateTemplateMeta(ctx, template.ID, codersdk.UpdateTemplateMeta{
|
||||
Name: template.Name,
|
||||
DisplayName: template.DisplayName,
|
||||
|
Reference in New Issue
Block a user