From 844cb6a6646454aaba28b602cf49284df32cdc9f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 29 Jan 2025 15:53:21 -0800 Subject: Add t.Parallel() to java tests Speeds up go test ./java from 32 seconds to 9 seconds. Test: go test ./java Change-Id: I4c6640e787c0744c6dfda03b7382839b452e24cf --- java/jacoco_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'java/jacoco_test.go') 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) -- cgit v1.2.3-59-g8ed1b