maven-surefire/0001-Port-to-TestNG-7.4.0.patch

55 lines
2.9 KiB
Diff
Raw Normal View History

From 749b5ec6d04904d82747b60f209945a917ec479e Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Mon, 10 Jul 2017 10:37:50 +0200
Subject: [PATCH 1/4] Port to TestNG 7.4.0
---
2018-07-02 12:28:31 +00:00
surefire-providers/surefire-testng/pom.xml | 3 +--
.../maven/surefire/testng/conf/AbstractDirectConfigurator.java | 2 +-
2021-11-09 09:50:54 +00:00
.../maven/surefire/testng/conf/TestNGMapConfigurator.java | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/surefire-providers/surefire-testng/pom.xml b/surefire-providers/surefire-testng/pom.xml
2023-12-13 12:21:22 +00:00
index 5cf9b2e..d23b123 100644
--- a/surefire-providers/surefire-testng/pom.xml
+++ b/surefire-providers/surefire-testng/pom.xml
2023-12-13 12:21:22 +00:00
@@ -54,8 +54,7 @@
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
- <version>5.10</version>
- <classifier>jdk15</classifier>
+ <version>7.4.0</version>
<scope>provided</scope>
</dependency>
<dependency>
diff --git a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java
2023-12-13 12:21:22 +00:00
index b73b9ba..ab187b6 100644
--- a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java
+++ b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/AbstractDirectConfigurator.java
2023-12-13 12:21:22 +00:00
@@ -57,7 +57,7 @@ public void configure(TestNG testng, Map<String, String> options) throws TestSet
testng.setUseDefaultListeners(false);
configureInstance(testng, options);
2018-07-02 12:28:31 +00:00
// TODO: we should have the Profile so that we can decide if this is needed or not
2023-12-13 12:21:22 +00:00
- testng.setListenerClasses(loadListenerClasses(listeners));
+ testng.setListenerClasses((List)loadListenerClasses(listeners));
2018-07-02 12:28:31 +00:00
}
@Override
2021-11-09 09:50:54 +00:00
diff --git a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java
2023-12-13 12:21:22 +00:00
index d91e76a..06dbd23 100755
2021-11-09 09:50:54 +00:00
--- a/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java
+++ b/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java
2023-12-13 12:21:22 +00:00
@@ -71,7 +71,7 @@ protected void configureThreadCount(XmlSuite suite, Map<String, String> options)
protected void configureParallel(XmlSuite suite, Map<String, String> options) throws TestSetFailedException {
String parallel = options.get(PARALLEL_PROP);
if (parallel != null) {
- suite.setParallel(parallel);
+ suite.setParallel(XmlSuite.ParallelMode.getValidParallel(parallel));
2021-11-09 09:50:54 +00:00
}
}
--
2023-12-13 12:21:22 +00:00
2.43.0