diff options
author | 2025-01-29 15:53:21 -0800 | |
---|---|---|
committer | 2025-01-31 11:31:24 -0800 | |
commit | 844cb6a6646454aaba28b602cf49284df32cdc9f (patch) | |
tree | 7c9ee579c7821f59b44e7a035b2a703fa5a2ab08 /java/lint_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/lint_test.go')
-rw-r--r-- | java/lint_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/lint_test.go b/java/lint_test.go index 617dc54cd..f7d3229b9 100644 --- a/java/lint_test.go +++ b/java/lint_test.go @@ -22,6 +22,7 @@ import ( ) func TestJavaLintDoesntUseBaselineImplicitly(t *testing.T) { + t.Parallel() ctx, _ := testJavaWithFS(t, ` java_library { name: "foo", @@ -46,6 +47,7 @@ func TestJavaLintDoesntUseBaselineImplicitly(t *testing.T) { } func TestJavaLintRequiresCustomLintFileToExist(t *testing.T) { + t.Parallel() android.GroupFixturePreparers( PrepareForTestWithJavaDefaultModules, android.PrepareForTestDisallowNonExistentPaths, @@ -65,6 +67,7 @@ func TestJavaLintRequiresCustomLintFileToExist(t *testing.T) { } func TestJavaLintUsesCorrectBpConfig(t *testing.T) { + t.Parallel() ctx, _ := testJavaWithFS(t, ` java_library { name: "foo", @@ -101,6 +104,7 @@ func TestJavaLintUsesCorrectBpConfig(t *testing.T) { } func TestJavaLintBypassUpdatableChecks(t *testing.T) { + t.Parallel() testCases := []struct { name string bp string @@ -144,6 +148,7 @@ func TestJavaLintBypassUpdatableChecks(t *testing.T) { for _, testCase := range testCases { t.Run(testCase.name, func(t *testing.T) { + t.Parallel() errorHandler := android.FixtureExpectsAtLeastOneErrorMatchingPattern(testCase.error) android.GroupFixturePreparers(PrepareForTestWithJavaDefaultModules). ExtendWithErrorHandler(errorHandler). @@ -153,6 +158,7 @@ func TestJavaLintBypassUpdatableChecks(t *testing.T) { } func TestJavaLintStrictUpdatabilityLinting(t *testing.T) { + t.Parallel() bp := ` java_library { name: "foo", |