|
14 | 14 |
|
15 | 15 | import org.elasticsearch.gradle.internal.test.rerun.model.TestCase; |
16 | 16 | import org.elasticsearch.gradle.internal.test.rerun.model.WorkUnit; |
17 | | -import org.gradle.api.Action; |
18 | 17 | import org.gradle.api.file.Directory; |
19 | 18 | import org.gradle.api.model.ObjectFactory; |
20 | 19 | import org.gradle.api.provider.Provider; |
21 | 20 | import org.gradle.api.tasks.testing.Test; |
22 | 21 | import org.gradle.api.tasks.testing.TestDescriptor; |
23 | | -import org.gradle.api.tasks.testing.TestFilter; |
24 | 22 | import org.gradle.api.tasks.testing.TestListener; |
25 | 23 | import org.gradle.api.tasks.testing.TestResult; |
26 | 24 |
|
@@ -66,17 +64,19 @@ public static void configureTestTask( |
66 | 64 | includes.add(testClassCase.getName() + "." + method); |
67 | 65 |
|
68 | 66 | if (paramString != null) { |
69 | | - // Because of randomized runner quirks, we need skip the test method by itself whenever we want to skip a test |
| 67 | + // Because of randomized runner quirks, we need skip the test method by itself whenever we want to skip a |
| 68 | + // test |
70 | 69 | // that has parameters |
71 | | - // This is because the runner has *two* separate checks that can cause the test to end up getting executed, so |
| 70 | + // This is because the runner has *two* separate checks that can cause the test to end up getting executed, |
| 71 | + // so |
72 | 72 | // we need filters that cover both checks |
73 | 73 | includes.add(testClassCase.getName() + "." + methodWithoutParams); |
74 | 74 | } else { |
75 | 75 | // We need to add the following, in case we're skipping an entire class of parameterized tests |
76 | 76 | includes.add(testClassCase.getName() + "." + method + " *"); |
77 | 77 | } |
78 | 78 | } |
79 | | - for (String include :includes) { |
| 79 | + for (String include : includes) { |
80 | 80 | testFilter.includeTestsMatching(include); |
81 | 81 | } |
82 | 82 | } |
|
0 commit comments