Skip to content

Commit 1a2e47f

Browse files
committed
test: fix flake in TestRoleSyncTable with test cases sharing resources
The test case definition shares maps that can have concurrent access if run in parallel. This fixes that
1 parent 2e5cd29 commit 1a2e47f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

coderd/idpsync/role_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,8 @@ func TestRoleSyncTable(t *testing.T) {
225225
// deployment. This tests all organizations being synced together.
226226
// The reason we do them individually, is that it is much easier to
227227
// debug a single test case.
228+
//nolint:paralleltest, tparallel // This should run after all the individual tests
228229
t.Run("AllTogether", func(t *testing.T) {
229-
t.Parallel()
230-
231230
db, _ := dbtestutil.NewDB(t)
232231
manager := runtimeconfig.NewManager()
233232
s := idpsync.NewAGPLSync(slogtest.Make(t, &slogtest.Options{

0 commit comments

Comments
 (0)