Skip to content

Commit 0f0e12f

Browse files
barakmichtstirrat15
authored andcommitted
chore(*): remove all t.Parallel test calls
1 parent afea030 commit 0f0e12f

File tree

96 files changed

+1
-1546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+1
-1546
lines changed

cmd/spicedb/memoryprotection/memory_protection_integration_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ func init() {
2929
}
3030

3131
func TestServeWithMemoryProtectionMiddleware(t *testing.T) {
32-
t.Parallel()
33-
3432
pool, err := dockertest.NewPool("")
3533
require.NoError(t, err)
3634

internal/datastore/common/changes_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,6 @@ func canonicalize(in []datastore.RevisionChanges) []datastore.RevisionChanges {
971971
}
972972

973973
func TestThreadSafe(t *testing.T) {
974-
t.Parallel()
975-
976974
ch := NewChanges(revisions.TransactionIDKeyFunc, datastore.WatchRelationships|datastore.WatchSchema, math.MaxInt64)
977975

978976
var wg errgroup.Group

internal/datastore/common/transaction_metadata_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@ import (
77
)
88

99
func TestMustStruct(t *testing.T) {
10-
t.Parallel()
11-
1210
cc := TransactionMetadata{"key": "value"}
1311

1412
ss := cc.MustStruct()
1513
require.NotNil(t, ss)
1614
}
1715

1816
func TestScan(t *testing.T) {
19-
t.Parallel()
20-
2117
tests := []struct {
2218
name string
2319
initial TransactionMetadata
@@ -50,8 +46,6 @@ func TestScan(t *testing.T) {
5046

5147
for _, tt := range tests {
5248
t.Run(tt.name, func(t *testing.T) {
53-
t.Parallel()
54-
5549
cc := tt.initial
5650
err := cc.Scan(tt.val)
5751

internal/datastore/crdb/crdb_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ func crdbTestVersion() string {
6969
}
7070

7171
func TestCRDBDatastoreWithoutIntegrity(t *testing.T) {
72-
t.Parallel()
7372
b := testdatastore.RunCRDBForTesting(t, "", crdbTestVersion())
7473
test.All(t, crdbFactory.NewTester(test.DatastoreTesterFunc(func(_ testing.TB, revisionQuantization, gcInterval, gcWindow time.Duration, watchBufferLength uint16) (datastore.Datastore, error) {
7574
ctx := context.Background()
@@ -130,7 +129,6 @@ func createDatastoreTest(b testdatastore.RunningEngineForTest, tf datastoreTestF
130129
}
131130

132131
func TestCRDBDatastoreWithFollowerReads(t *testing.T) {
133-
t.Parallel()
134132
followerReadDelay := time.Duration(4.8 * float64(time.Second))
135133
gcWindow := 100 * time.Second
136134

@@ -142,7 +140,6 @@ func TestCRDBDatastoreWithFollowerReads(t *testing.T) {
142140
}
143141
for _, quantization := range quantizationDurations {
144142
t.Run(fmt.Sprintf("Quantization%s", quantization), func(t *testing.T) {
145-
t.Parallel()
146143
ctx := context.Background()
147144

148145
ds := engine.NewDatastore(t, func(engine, uri string) datastore.Datastore {
@@ -196,7 +193,6 @@ var defaultKeyForTesting = proxy.KeyConfig{
196193
}
197194

198195
func TestCRDBDatastoreWithIntegrity(t *testing.T) { //nolint:tparallel
199-
t.Parallel()
200196
b := testdatastore.RunCRDBForTesting(t, "", crdbTestVersion())
201197

202198
test.All(t, crdbFactory.NewTester(test.DatastoreTesterFunc(func(_ testing.TB, revisionQuantization, gcInterval, gcWindow time.Duration, watchBufferLength uint16) (datastore.Datastore, error) {
@@ -256,7 +252,6 @@ func TestCRDBDatastoreWithIntegrity(t *testing.T) { //nolint:tparallel
256252
}
257253

258254
func TestWatchFeatureDetection(t *testing.T) {
259-
t.Parallel()
260255
pool, err := dockertest.NewPool("")
261256
require.NoError(t, err)
262257
cases := []struct {
@@ -301,7 +296,6 @@ func TestWatchFeatureDetection(t *testing.T) {
301296
for _, tt := range cases {
302297
tt := tt
303298
t.Run(tt.name, func(t *testing.T) {
304-
t.Parallel()
305299
ctx, cancel := context.WithCancel(context.Background())
306300
t.Cleanup(cancel)
307301
adminConn, connStrings := newCRDBWithUser(t, pool)

internal/datastore/crdb/pool/pool_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ func createTestRetryPool(testPool *TestPool) *RetryPool {
8181
}
8282

8383
func TestContextCancelledDuringBlockingAcquire(t *testing.T) {
84-
t.Parallel()
8584
synctest.Test(t, func(t *testing.T) {
8685
testPool := NewTestPool()
8786
testPool.acquireFunc = func(ctx context.Context) (*pgxpool.Conn, error) {
@@ -112,7 +111,6 @@ func TestContextCancelledDuringBlockingAcquire(t *testing.T) {
112111
}
113112

114113
func TestAcquireTimeoutReturnsErrAcquire(t *testing.T) {
115-
t.Parallel()
116114
synctest.Test(t, func(t *testing.T) {
117115
testPool := NewTestPool()
118116
testPool.acquireFunc = func(ctx context.Context) (*pgxpool.Conn, error) {
@@ -143,7 +141,6 @@ func TestAcquireTimeoutReturnsErrAcquire(t *testing.T) {
143141
}
144142

145143
func TestAcquireSucceedsButTopLevelContextCancelled(t *testing.T) {
146-
t.Parallel()
147144
testPool := NewTestPool()
148145

149146
retryPool := createTestRetryPool(testPool)
@@ -160,7 +157,6 @@ func TestAcquireSucceedsButTopLevelContextCancelled(t *testing.T) {
160157
}
161158

162159
func TestAcquireErrorWithConnectionReturned(t *testing.T) {
163-
t.Parallel()
164160
synctest.Test(t, func(t *testing.T) {
165161
testPool := NewTestPool()
166162
testPool.acquireFunc = func(ctx context.Context) (*pgxpool.Conn, error) {
@@ -185,7 +181,6 @@ func TestAcquireErrorWithConnectionReturned(t *testing.T) {
185181
}
186182

187183
func TestAcquireSucceedsWithinTimeout(t *testing.T) {
188-
t.Parallel()
189184
synctest.Test(t, func(t *testing.T) {
190185
testPool := NewTestPool()
191186
testPool.acquireFunc = func(ctx context.Context) (*pgxpool.Conn, error) {
@@ -216,7 +211,6 @@ func TestAcquireSucceedsWithinTimeout(t *testing.T) {
216211
}
217212

218213
func TestNoAcquireTimeoutUsesOriginalContext(t *testing.T) {
219-
t.Parallel()
220214
var acquireContext context.Context
221215

222216
testPool := NewTestPool()
@@ -237,7 +231,6 @@ func TestNoAcquireTimeoutUsesOriginalContext(t *testing.T) {
237231
}
238232

239233
func TestAcquireTimeoutCreatesSeparateContext(t *testing.T) {
240-
t.Parallel()
241234
synctest.Test(t, func(t *testing.T) {
242235
var acquireContext context.Context
243236

@@ -268,7 +261,6 @@ func TestAcquireTimeoutCreatesSeparateContext(t *testing.T) {
268261
}
269262

270263
func TestAcquireTimeoutContextCausePreserved(t *testing.T) {
271-
t.Parallel()
272264
synctest.Test(t, func(t *testing.T) {
273265
testPool := NewTestPool()
274266
testPool.acquireFunc = func(ctx context.Context) (*pgxpool.Conn, error) {
@@ -295,7 +287,6 @@ func TestAcquireTimeoutContextCausePreserved(t *testing.T) {
295287
}
296288

297289
func TestSuccessfulFunctionExecution(t *testing.T) {
298-
t.Parallel()
299290
testPool := NewTestPool()
300291
testPool.acquireFunc = func(ctx context.Context) (*pgxpool.Conn, error) {
301292
return &pgxpool.Conn{}, nil

internal/datastore/memdb/memdb_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,10 @@ func (memDBTest) New(_ testing.TB, revisionQuantization, _, gcWindow time.Durati
2828
}
2929

3030
func TestMemdbDatastore(t *testing.T) {
31-
t.Parallel()
3231
test.All(t, memdbFactory.NewTester(memDBTest{}), true)
3332
}
3433

3534
func TestConcurrentWritePanic(t *testing.T) {
36-
t.Parallel()
3735
require := require.New(t)
3836

3937
ds, err := NewMemdbDatastore(0, 1*time.Hour, 1*time.Hour)
@@ -85,7 +83,6 @@ func TestConcurrentWritePanic(t *testing.T) {
8583
}
8684

8785
func TestConcurrentWriteRelsError(t *testing.T) {
88-
t.Parallel()
8986
require := require.New(t)
9087

9188
ds, err := NewMemdbDatastore(0, 1*time.Hour, 1*time.Hour)
@@ -116,7 +113,6 @@ func TestConcurrentWriteRelsError(t *testing.T) {
116113
}
117114

118115
func TestAnythingAfterCloseDoesNotPanic(t *testing.T) {
119-
t.Parallel()
120116
require := require.New(t)
121117

122118
ds, err := NewMemdbDatastore(0, 1*time.Hour, 1*time.Hour)

internal/datastore/postgres/pgbouncer_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ func pgbouncerTestVersion() string {
2121
var pgbouncerConfig = postgresTestConfig{"head", "", pgbouncerTestVersion(), true}
2222

2323
func TestPostgresWithPgBouncerDatastore(t *testing.T) {
24-
t.Parallel()
2524
testPostgresDatastore(t, pgbouncerConfig)
2625
}
2726

2827
func TestPostgresDatastoreWithPgBouncerWithoutCommitTimestamps(t *testing.T) {
29-
t.Parallel()
3028
testPostgresDatastoreWithoutCommitTimestamps(t, pgbouncerConfig)
3129
}

internal/datastore/postgres/postgres_shared_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ func testPostgresDatastore(t *testing.T, config postgresTestConfig) {
110110
})
111111

112112
t.Run(fmt.Sprintf("%spostgres-%s-%s-%s", pgbouncerStr, config.pgVersion, config.targetMigration, config.migrationPhase), func(t *testing.T) {
113-
t.Parallel()
114113
b := testdatastore.RunPostgresForTesting(t, "", config.targetMigration, config.pgVersion, config.pgbouncer)
115114
ctx := context.Background()
116115

@@ -306,8 +305,6 @@ func testPostgresDatastoreWithoutCommitTimestamps(t *testing.T, config postgresT
306305
pgVersion := config.pgVersion
307306
enablePgbouncer := config.pgbouncer
308307
t.Run(fmt.Sprintf("postgres-%s", pgVersion), func(t *testing.T) {
309-
t.Parallel()
310-
311308
ctx := context.Background()
312309
b := testdatastore.RunPostgresForTestingWithCommitTimestamps(t, "", "head", false, pgVersion, enablePgbouncer)
313310

internal/datastore/postgres/postgres_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,20 @@ func postgresTestVersion() string {
2929
var postgresConfig = postgresTestConfig{"head", "", postgresTestVersion(), false}
3030

3131
func TestPostgresDatastore(t *testing.T) {
32-
t.Parallel()
3332
testPostgresDatastore(t, postgresConfig)
3433
}
3534

3635
func TestPostgresDatastoreWithoutCommitTimestamps(t *testing.T) {
37-
t.Parallel()
3836
testPostgresDatastoreWithoutCommitTimestamps(t, postgresConfig)
3937
}
4038

4139
func TestPostgresDatastoreGC(t *testing.T) {
42-
t.Parallel()
43-
4440
config := postgresConfig
4541
pgbouncerStr := ""
4642
if config.pgbouncer {
4743
pgbouncerStr = "pgbouncer-"
4844
}
4945
t.Run(fmt.Sprintf("%spostgres-gc-%s-%s-%s", pgbouncerStr, config.pgVersion, config.targetMigration, config.migrationPhase), func(t *testing.T) {
50-
t.Parallel()
51-
5246
b := testdatastore.RunPostgresForTesting(t, "", config.targetMigration, config.pgVersion, config.pgbouncer)
5347

5448
t.Run("GarbageCollection", createDatastoreTest(

internal/datastore/proxy/relationshipintegrity_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,6 @@ func TestBasicIntegrityFailureDueToWriteWithExpiredKey(t *testing.T) {
245245
}
246246

247247
func TestWatchIntegrityFailureDueToInvalidHashSignature(t *testing.T) {
248-
t.Parallel()
249-
250248
ds, err := dsfortesting.NewMemDBDatastoreForTesting(t, 0, 5*time.Second, 1*time.Hour)
251249
require.NoError(t, err)
252250

0 commit comments

Comments
 (0)