Skip to content

test: do not run memory race test in parallel #17582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions coderd/idpsync/group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func TestParseGroupClaims(t *testing.T) {
})
}

//nolint:paralleltest, tparallel
func TestGroupSyncTable(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -248,9 +249,11 @@ func TestGroupSyncTable(t *testing.T) {

for _, tc := range testCases {
tc := tc
// The final test, "AllTogether", cannot run in parallel.
// These tests are nearly instant using the memory db, so
// this is still fast without being in parallel.
//nolint:paralleltest, tparallel
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()

db, _ := dbtestutil.NewDB(t)
manager := runtimeconfig.NewManager()
s := idpsync.NewAGPLSync(slogtest.Make(t, &slogtest.Options{}),
Expand Down Expand Up @@ -289,9 +292,8 @@ func TestGroupSyncTable(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{}),
Expand Down
7 changes: 5 additions & 2 deletions coderd/idpsync/role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/coder/coder/v2/testutil"
)

//nolint:paralleltest, tparallel
func TestRoleSyncTable(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -190,9 +191,11 @@ func TestRoleSyncTable(t *testing.T) {

for _, tc := range testCases {
tc := tc
// The final test, "AllTogether", cannot run in parallel.
// These tests are nearly instant using the memory db, so
// this is still fast without being in parallel.
//nolint:paralleltest, tparallel
t.Run(tc.Name, func(t *testing.T) {
t.Parallel()

db, _ := dbtestutil.NewDB(t)
manager := runtimeconfig.NewManager()
s := idpsync.NewAGPLSync(slogtest.Make(t, &slogtest.Options{
Expand Down
Loading