Skip to content

Commit 8589b10

Browse files
committed
handler_test uses pkg vars, cannot t.Parallel
1 parent a44fce9 commit 8589b10

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

internal/handler/handler_test.go

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

1414
func TestProcess(t *testing.T) {
15-
t.Parallel()
15+
// NOTE. No Parallel, uses pkg lvl variables
1616
type args struct {
1717
handler.Info
1818
}
@@ -117,7 +117,7 @@ func TestProcess(t *testing.T) {
117117
for _, ttv := range tests {
118118
tt := ttv
119119
t.Run(tt.name, func(t *testing.T) {
120-
t.Parallel()
120+
// NOTE. No Parallel, uses pkg lvl variables
121121
if handler.WorkToDo(tt.args.Any, tt.args.Err) {
122122
handler.Process(&tt.args.Info)
123123

@@ -145,7 +145,8 @@ func Handle() {
145145
}
146146

147147
func TestPreProcess_debug(t *testing.T) {
148-
t.Parallel()
148+
// NOTE. No Parallel, uses pkg lvl variables
149+
149150
// in real case PreProcess is called from Handle function. So, we make our
150151
// own Handle here. Now our test function name will be the Handle caller
151152
// and that's what error stack tracing is all about
@@ -163,7 +164,7 @@ func TestPreProcess_debug(t *testing.T) {
163164
}
164165

165166
func TestPreProcess(t *testing.T) {
166-
t.Parallel()
167+
// NOTE. No Parallel, uses pkg lvl variables
167168
type args struct {
168169
handler.Info
169170
a []any
@@ -233,7 +234,7 @@ func TestPreProcess(t *testing.T) {
233234
for _, ttv := range tests {
234235
tt := ttv
235236
t.Run(tt.name, func(t *testing.T) {
236-
t.Parallel()
237+
// NOTE. No Parallel, uses pkg lvl variables
237238
if handler.WorkToDo(tt.args.Any, tt.args.Err) &&
238239
len(tt.args.a) > 0 {
239240

0 commit comments

Comments
 (0)