From 1a2e47f492b3fe9e1e3335c8a36d357fb8170e4b Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Wed, 16 Apr 2025 18:08:33 -0500 Subject: [PATCH] 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 --- coderd/idpsync/role_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/coderd/idpsync/role_test.go b/coderd/idpsync/role_test.go index 7d686442144b1..d766ada6057f7 100644 --- a/coderd/idpsync/role_test.go +++ b/coderd/idpsync/role_test.go @@ -225,9 +225,8 @@ func TestRoleSyncTable(t *testing.T) { // deployment. This tests all organizations being synced together. // The reason we do them individually, is that it is much easier to // debug a single test case. + //nolint:paralleltest, tparallel // This should run after all the individual tests t.Run("AllTogether", func(t *testing.T) { - t.Parallel() - db, _ := dbtestutil.NewDB(t) manager := runtimeconfig.NewManager() s := idpsync.NewAGPLSync(slogtest.Make(t, &slogtest.Options{