Skip to content

Commit 47d3825

Browse files
committed
chore(*): remove all t.Parallel test calls
1 parent cd1ac3c commit 47d3825

File tree

92 files changed

+0
-1045
lines changed

Some content is hidden

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

92 files changed

+0
-1045
lines changed

cmd/spicedb/memoryprotection/memory_protection_integration_test.go

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

3131
func TestServeWithMemoryProtectionMiddleware(t *testing.T) {
32-
t.Parallel()
3332

3433
pool, err := dockertest.NewPool("")
3534
require.NoError(t, err)

internal/datastore/common/changes_test.go

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

973973
func TestThreadSafe(t *testing.T) {
974-
t.Parallel()
975974

976975
ch := NewChanges(revisions.TransactionIDKeyFunc, datastore.WatchRelationships|datastore.WatchSchema, math.MaxInt64)
977976

internal/datastore/common/transaction_metadata_test.go

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

99
func TestMustStruct(t *testing.T) {
10-
t.Parallel()
1110

1211
cc := TransactionMetadata{"key": "value"}
1312

@@ -16,7 +15,6 @@ func TestMustStruct(t *testing.T) {
1615
}
1716

1817
func TestScan(t *testing.T) {
19-
t.Parallel()
2018

2119
tests := []struct {
2220
name string
@@ -50,7 +48,6 @@ func TestScan(t *testing.T) {
5048

5149
for _, tt := range tests {
5250
t.Run(tt.name, func(t *testing.T) {
53-
t.Parallel()
5451

5552
cc := tt.initial
5653
err := cc.Scan(tt.val)

internal/datastore/crdb/crdb_test.go

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

7676
func TestCRDBDatastoreWithoutIntegrity(t *testing.T) {
77-
t.Parallel()
7877
b := testdatastore.RunCRDBForTesting(t, "", crdbTestVersion())
7978
test.All(t, test.DatastoreTesterFunc(func(_ testing.TB, revisionQuantization, gcInterval, gcWindow time.Duration, watchBufferLength uint16) (datastore.Datastore, error) {
8079
ctx := context.Background()
@@ -135,7 +134,6 @@ func createDatastoreTest(b testdatastore.RunningEngineForTest, tf datastoreTestF
135134
}
136135

137136
func TestCRDBDatastoreWithFollowerReads(t *testing.T) {
138-
t.Parallel()
139137
followerReadDelay := time.Duration(4.8 * float64(time.Second))
140138
gcWindow := 100 * time.Second
141139

@@ -147,7 +145,6 @@ func TestCRDBDatastoreWithFollowerReads(t *testing.T) {
147145
}
148146
for _, quantization := range quantizationDurations {
149147
t.Run(fmt.Sprintf("Quantization%s", quantization), func(t *testing.T) {
150-
t.Parallel()
151148
ctx := context.Background()
152149

153150
ds := engine.NewDatastore(t, func(engine, uri string) datastore.Datastore {
@@ -201,7 +198,6 @@ var defaultKeyForTesting = proxy.KeyConfig{
201198
}
202199

203200
func TestCRDBDatastoreWithIntegrity(t *testing.T) { //nolint:tparallel
204-
t.Parallel()
205201
b := testdatastore.RunCRDBForTesting(t, "", crdbTestVersion())
206202

207203
test.All(t, test.DatastoreTesterFunc(func(_ testing.TB, revisionQuantization, gcInterval, gcWindow time.Duration, watchBufferLength uint16) (datastore.Datastore, error) {
@@ -261,7 +257,6 @@ func TestCRDBDatastoreWithIntegrity(t *testing.T) { //nolint:tparallel
261257
}
262258

263259
func TestWatchFeatureDetection(t *testing.T) {
264-
t.Parallel()
265260
pool, err := dockertest.NewPool("")
266261
require.NoError(t, err)
267262
cases := []struct {
@@ -306,7 +301,6 @@ func TestWatchFeatureDetection(t *testing.T) {
306301
for _, tt := range cases {
307302
tt := tt
308303
t.Run(tt.name, func(t *testing.T) {
309-
t.Parallel()
310304
ctx, cancel := context.WithCancel(context.Background())
311305
t.Cleanup(cancel)
312306
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
@@ -26,12 +26,10 @@ func (mdbt memDBTest) New(_ testing.TB, revisionQuantization, _, gcWindow time.D
2626
}
2727

2828
func TestMemdbDatastore(t *testing.T) {
29-
t.Parallel()
3029
test.All(t, memDBTest{}, true)
3130
}
3231

3332
func TestConcurrentWritePanic(t *testing.T) {
34-
t.Parallel()
3533
require := require.New(t)
3634

3735
ds, err := NewMemdbDatastore(0, 1*time.Hour, 1*time.Hour)
@@ -83,7 +81,6 @@ func TestConcurrentWritePanic(t *testing.T) {
8381
}
8482

8583
func TestConcurrentWriteRelsError(t *testing.T) {
86-
t.Parallel()
8784
require := require.New(t)
8885

8986
ds, err := NewMemdbDatastore(0, 1*time.Hour, 1*time.Hour)
@@ -114,7 +111,6 @@ func TestConcurrentWriteRelsError(t *testing.T) {
114111
}
115112

116113
func TestAnythingAfterCloseDoesNotPanic(t *testing.T) {
117-
t.Parallel()
118114
require := require.New(t)
119115

120116
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ func testPostgresDatastore(t *testing.T, config postgresTestConfig) {
115115
})
116116

117117
t.Run(fmt.Sprintf("%spostgres-%s-%s-%s", pgbouncerStr, config.pgVersion, config.targetMigration, config.migrationPhase), func(t *testing.T) {
118-
t.Parallel()
119118
b := testdatastore.RunPostgresForTesting(t, "", config.targetMigration, config.pgVersion, config.pgbouncer)
120119
ctx := context.Background()
121120

@@ -311,7 +310,6 @@ func testPostgresDatastoreWithoutCommitTimestamps(t *testing.T, config postgresT
311310
pgVersion := config.pgVersion
312311
enablePgbouncer := config.pgbouncer
313312
t.Run(fmt.Sprintf("postgres-%s", pgVersion), func(t *testing.T) {
314-
t.Parallel()
315313

316314
ctx := context.Background()
317315
b := testdatastore.RunPostgresForTestingWithCommitTimestamps(t, "", "head", false, pgVersion, enablePgbouncer)

internal/datastore/postgres/postgres_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,21 @@ 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()
4340

4441
config := postgresConfig
4542
pgbouncerStr := ""
4643
if config.pgbouncer {
4744
pgbouncerStr = "pgbouncer-"
4845
}
4946
t.Run(fmt.Sprintf("%spostgres-gc-%s-%s-%s", pgbouncerStr, config.pgVersion, config.targetMigration, config.migrationPhase), func(t *testing.T) {
50-
t.Parallel()
5147

5248
b := testdatastore.RunPostgresForTesting(t, "", config.targetMigration, config.pgVersion, config.pgbouncer)
5349

internal/datastore/proxy/relationshipintegrity_test.go

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

247247
func TestWatchIntegrityFailureDueToInvalidHashSignature(t *testing.T) {
248-
t.Parallel()
249248

250249
ds, err := dsfortesting.NewMemDBDatastoreForTesting(t, 0, 5*time.Second, 1*time.Hour)
251250
require.NoError(t, err)

0 commit comments

Comments
 (0)