Skip to content

Commit 5a890c4

Browse files
authored
test: fix TestUploadFileLargeModuleFiles flake, context to subtest (#18395)
Declared context outside the subtest t.Parallel.
1 parent 5c16079 commit 5a890c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coderd/provisionerdserver/upload_file_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ import (
2323
func TestUploadFileLargeModuleFiles(t *testing.T) {
2424
t.Parallel()
2525

26-
ctx := testutil.Context(t, testutil.WaitMedium)
27-
2826
// Create server
2927
server, db, _, _ := setup(t, false, &overrides{
3028
externalAuthConfigs: []*externalauth.Config{{}},
@@ -42,6 +40,8 @@ func TestUploadFileLargeModuleFiles(t *testing.T) {
4240
t.Run(fmt.Sprintf("size_%d_bytes", size), func(t *testing.T) {
4341
t.Parallel()
4442

43+
ctx := testutil.Context(t, testutil.WaitMedium)
44+
4545
// Generate test module files data
4646
moduleData := make([]byte, size)
4747
_, err := crand.Read(moduleData)

0 commit comments

Comments
 (0)