Skip to content

Commit eace6a1

Browse files
authored
test: Allow fix tests to run concurrently (#1576)
1 parent f00da2c commit eace6a1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/fix_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ func TestFix(t *testing.T) {
2727
if os.Getenv("GL_KEEP_TEMP_FILES") == "1" {
2828
t.Logf("Temp dir for fix test: %s", tmpDir)
2929
} else {
30-
defer os.RemoveAll(tmpDir)
30+
t.Cleanup(func() {
31+
os.RemoveAll(tmpDir)
32+
})
3133
}
3234

3335
fixDir := filepath.Join(testdataDir, "fix")
@@ -38,9 +40,11 @@ func TestFix(t *testing.T) {
3840
for _, input := range inputs {
3941
input := input
4042
t.Run(filepath.Base(input), func(t *testing.T) {
43+
t.Parallel()
44+
4145
args := []string{
4246
"--disable-all", "--print-issued-lines=false", "--print-linter-name=false", "--out-format=line-number",
43-
"--fix",
47+
"--allow-parallel-runners", "--fix",
4448
input,
4549
}
4650
rc := extractRunContextFromComments(t, input)

0 commit comments

Comments
 (0)