File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
plugin/src/test/groovy/org/gradle/testretry/testframework Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 15
15
*/
16
16
package org.gradle.testretry.testframework
17
17
18
+ import org.gradle.util.GradleVersion
19
+
18
20
import javax.annotation.Nullable
19
21
20
22
class TestNGPlainFuncTest extends BaseTestNGFuncTest {
23
+
24
+ private static final GradleVersion GRADLE_9 = GradleVersion . version(" 9.0" )
25
+
21
26
@Override
22
27
String reportedLifecycleMethodName (String gradleVersion , TestNGLifecycleType lifecycleType , String methodName ) {
23
28
methodName
@@ -60,9 +65,17 @@ class TestNGPlainFuncTest extends BaseTestNGFuncTest {
60
65
def result = gradleRunner(gradleVersion as String).buildAndFail()
61
66
62
67
then:
63
- with(result.output) {
64
- it.contains('There were failing tests. See the report')
65
- !it.contains('The following test methods could not be retried')
68
+ if (GradleVersion.version(gradleVersion) < GRADLE_9) {
69
+ with(result.output) {
70
+ it.contains('There were failing tests. See the report')
71
+ !it.contains('The following test methods could not be retried')
72
+ }
73
+ } else {
74
+ with(result.output) {
75
+ // Gradle 9 detects this as a fatal test framework error
76
+ it.contains('Could not complete execution for Gradle Test Executor')
77
+ !it.contains('The following test methods could not be retried')
78
+ }
66
79
}
67
80
68
81
where:
You can’t perform that action at this time.
0 commit comments