diff options
author | 2025-01-29 15:53:21 -0800 | |
---|---|---|
committer | 2025-01-31 11:31:24 -0800 | |
commit | 844cb6a6646454aaba28b602cf49284df32cdc9f (patch) | |
tree | 7c9ee579c7821f59b44e7a035b2a703fa5a2ab08 /java/jacoco_test.go | |
parent | 03272a40f104893ae6082aaeb882216fec4eb1f3 (diff) |
Add t.Parallel() to java tests
Speeds up go test ./java from 32 seconds to 9 seconds.
Test: go test ./java
Change-Id: I4c6640e787c0744c6dfda03b7382839b452e24cf
Diffstat (limited to 'java/jacoco_test.go')
-rw-r--r-- | java/jacoco_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/java/jacoco_test.go b/java/jacoco_test.go index 1882908ca..58a091e4c 100644 --- a/java/jacoco_test.go +++ b/java/jacoco_test.go @@ -17,6 +17,7 @@ package java import "testing" func TestJacocoFilterToSpecs(t *testing.T) { + t.Parallel() testCases := []struct { name, in, out string }{ @@ -54,6 +55,7 @@ func TestJacocoFilterToSpecs(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { + t.Parallel() got, err := jacocoFilterToSpec(testCase.in) if err != nil { t.Error(err) @@ -66,6 +68,7 @@ func TestJacocoFilterToSpecs(t *testing.T) { } func TestJacocoFiltersToZipCommand(t *testing.T) { + t.Parallel() testCases := []struct { name string includes, excludes []string @@ -96,6 +99,7 @@ func TestJacocoFiltersToZipCommand(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { + t.Parallel() got := jacocoFiltersToZipCommand(testCase.includes, testCase.excludes) if got != testCase.out { t.Errorf("expected %q got %q", testCase.out, got) |