Add t.Parallel() to SDK tests
Reduces time to run go test ./sdk from 44 seconds to 22.5 seconds.
Requires moving snapshotTestCustomizations from a map to a struct
with individual fields to avoid concurrent map accesses between
subtests.
Test: go test ./sdk
Change-Id: Id6f451ba9cbace8bc7ea915033a795456b85cf3f
diff --git a/sdk/member_trait_test.go b/sdk/member_trait_test.go
index 673d6fb..9b41e9b 100644
--- a/sdk/member_trait_test.go
+++ b/sdk/member_trait_test.go
@@ -116,6 +116,7 @@
}
func TestBasicTrait_WithoutTrait(t *testing.T) {
+ t.Parallel()
result := android.GroupFixturePreparers(
prepareForSdkTestWithJava,
android.FixtureWithRootAndroidBp(`
@@ -154,6 +155,7 @@
}
func TestBasicTrait_MultipleTraits(t *testing.T) {
+ t.Parallel()
result := android.GroupFixturePreparers(
prepareForSdkTestWithJava,
android.FixtureWithRootAndroidBp(`
@@ -262,6 +264,7 @@
}
func TestTraitUnsupportedByMemberType(t *testing.T) {
+ t.Parallel()
android.GroupFixturePreparers(
prepareForSdkTestWithJava,
android.FixtureWithRootAndroidBp(`