Skip to content
This repository was archived by the owner on Dec 6, 2025. It is now read-only.

Commit 8494d12

Browse files
committed
feat: t.Parallel()
1 parent a776fc7 commit 8494d12

30 files changed

+203
-1
lines changed

.golangci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ linters:
3535
- godox # TODO
3636
- nestif # TODO
3737
- nlreturn # TODO
38-
- paralleltest # TODO
3938
- protogetter # TODO
4039
- revive # TODO
4140
- stylecheck # TODO

libs/common/auth/auth_test.go

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

99
func TestIDTokenClaims_AsExpected(t *testing.T) {
10+
t.Parallel()
11+
1012
tests := []struct {
1113
name string
1214
claims IDTokenClaims
@@ -95,6 +97,8 @@ func TestIDTokenClaims_AsExpected(t *testing.T) {
9597

9698
for _, tt := range tests {
9799
t.Run(tt.name, func(t *testing.T) {
100+
t.Parallel()
101+
98102
err := tt.claims.AsExpected()
99103
if tt.expectedError {
100104
require.Error(t, err)

libs/common/hwgrpc/hwgrpc_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ func arrayEq(t *testing.T, expected []language.Tag, parsed []language.Tag) {
2121
}
2222

2323
func TestParseLocales(t *testing.T) {
24+
t.Parallel()
2425
const mdnExample = "fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5"
2526
expected := []language.Tag{language.MustParse("fr-CH"), language.French, language.English, language.German}
2627
parsed, ok := hwgrpc.ParseLocales(mdnExample)
@@ -32,6 +33,7 @@ func TestParseLocales(t *testing.T) {
3233
}
3334

3435
func TestParseLocalesReordered(t *testing.T) {
36+
t.Parallel()
3537
const mdnExample = "fr-CH, de;q=0.7, en;q=0.8, fr;q=0.9, *;q=0.5"
3638
expected := []language.Tag{language.MustParse("fr-CH"), language.French, language.English, language.German}
3739
parsed, ok := hwgrpc.ParseLocales(mdnExample)
@@ -43,6 +45,7 @@ func TestParseLocalesReordered(t *testing.T) {
4345
}
4446

4547
func TestParseLocalesSimple(t *testing.T) {
48+
t.Parallel()
4649
const mdnExample = "de"
4750
expected := []language.Tag{language.German}
4851
parsed, ok := hwgrpc.ParseLocales(mdnExample)

libs/common/hwgrpc/locale_interceptor_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import (
1212
)
1313

1414
func TestLocaleInterceptor(t *testing.T) {
15+
t.Parallel()
16+
1517
testCases := map[string][]string{
1618
"de": {"de"},
1719
"en": {"en"},
@@ -22,8 +24,11 @@ func TestLocaleInterceptor(t *testing.T) {
2224
}
2325

2426
for acceptLanguageHeader, expectedLocalesStrings := range testCases {
27+
t.Parallel()
2528
t.Run(fmt.Sprintf("Test localeInterceptor with accept-language header of '%s'", acceptLanguageHeader),
2629
func(t *testing.T) {
30+
t.Parallel()
31+
2732
ctx := context.Background()
2833

2934
md := metadata.New(map[string]string{

libs/common/hwgrpc/panic_interceptor_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ type RecoverySuite struct {
3737
}
3838

3939
func TestPanicRecoverInterceptor(t *testing.T) {
40+
t.Parallel()
4041
telemetry.SetupMetrics(context.Background(), nil)
4142
s := &RecoverySuite{
4243
InterceptorTestSuite: &testpb.InterceptorTestSuite{

libs/common/test/grpc_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ import (
1212
// - AuthenticatedUserMetadata accesses the AuthenticatedUserClaim map incorrectly
1313
// - AuthenticatedUserClaim map is not JSON-able
1414
func TestAuthenticatedUserMetadataDoesNotCrash(t *testing.T) {
15+
t.Parallel()
1516
_ = AuthenticatedUserMetadata(uuid.NewString())
1617
}

libs/hwauthz/spicedb/spicedb_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func TestMain(m *testing.M) {
5252
}
5353

5454
func TestBulkCheck(t *testing.T) {
55+
t.Parallel()
5556
ctx := context.Background()
5657
client := NewSpiceDBAuthZ()
5758

@@ -102,6 +103,8 @@ func TestBulkCheck(t *testing.T) {
102103
}
103104

104105
func TestLookupResources(t *testing.T) {
106+
t.Parallel()
107+
105108
ctx := context.Background()
106109
client := NewSpiceDBAuthZ()
107110

@@ -134,6 +137,8 @@ func TestLookupResources(t *testing.T) {
134137
}
135138

136139
func TestDeleteObject(t *testing.T) {
140+
t.Parallel()
141+
137142
// client
138143
ctx := context.Background()
139144
client := NewSpiceDBAuthZ()

libs/hwdb/helper_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@ import (
88
)
99

1010
func TestPbToTimestamp(t *testing.T) {
11+
t.Parallel()
12+
1113
t.Run("src = nil", func(t *testing.T) {
14+
t.Parallel()
15+
1216
if hwdb.PbToTimestamp(nil).Valid {
1317
t.Error()
1418
}
1519
})
1620

1721
t.Run("src not nil", func(t *testing.T) {
22+
t.Parallel()
23+
1824
src := timestamppb.Timestamp{
1925
Seconds: 0,
2026
Nanos: 0,

libs/hwes/aggregate_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import (
88
)
99

1010
func TestResolveAggregateIDAndTypeFromStreamID(t *testing.T) {
11+
t.Parallel()
12+
1113
testCases := []struct {
1214
streamID string
1315
expectedError bool

libs/hwes/event_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import (
1111
)
1212

1313
func TestEventWithUserID(t *testing.T) {
14+
t.Parallel()
15+
1416
ctx := context.Background()
1517
u := uuid.New()
1618
e := hwes.Event{}
@@ -25,6 +27,8 @@ func TestEventWithUserID(t *testing.T) {
2527
}
2628

2729
func TestEventWithOrganizationID(t *testing.T) {
30+
t.Parallel()
31+
2832
ctx := context.Background()
2933
u := uuid.New()
3034
e := hwes.Event{}

0 commit comments

Comments
 (0)