Run TestClasspath subtests in parallel
Call t.Parallel() to make the subtests of TestClasspath run in parallel, which drops the runtime from 12 seconds to 1.7 seconds. Test: TestClasspath Flag: EXEMPT refactor Change-Id: Id2194f6b5f925b480280e9cf8da5d5767a467430
This commit is contained in:
@@ -388,7 +388,9 @@ func TestClasspath(t *testing.T) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.Parallel()
|
||||||
t.Run("basic", func(t *testing.T) {
|
t.Run("basic", func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
testClasspathTestCases(t, classpathTestcases, false)
|
testClasspathTestCases(t, classpathTestcases, false)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -404,6 +406,7 @@ func testClasspathTestCases(t *testing.T, classpathTestcases []classpathTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
t.Run(testcase.name, func(t *testing.T) {
|
t.Run(testcase.name, func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
moduleType := "java_library"
|
moduleType := "java_library"
|
||||||
if testcase.moduleType != "" {
|
if testcase.moduleType != "" {
|
||||||
moduleType = testcase.moduleType
|
moduleType = testcase.moduleType
|
||||||
|
Reference in New Issue
Block a user