From 749b5ec6d04904d82747b60f209945a917ec479e Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 10 Jul 2017 10:37:50 +0200 Subject: [PATCH 1/4] Port to TestNG 7.4.0 --- surefire-providers/surefire-testng/pom.xml | 3 +-- .../maven/surefire/testng/conf/AbstractDirectConfigurator.java | 2 +- .../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 index ece647d6a..682f296e6 100644 --- a/surefire-providers/surefire-testng/pom.xml +++ b/surefire-providers/surefire-testng/pom.xml @@ -51,8 +51,7 @@ org.testng testng - 5.10 - jdk15 + 7.4.0 provided 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 index ed918f538..c4a0cd19d 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 @@ -63,7 +63,7 @@ public void configure( TestNG testng, Map options ) testng.setUseDefaultListeners( false ); configureInstance( testng, options ); // TODO: we should have the Profile so that we can decide if this is needed or not - testng.setListenerClasses( loadListenerClasses( listeners ) ); + testng.setListenerClasses( ( List ) loadListenerClasses( listeners ) ); } @Override 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 index 6caf82459..2d988381f 100755 --- 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 @@ -68,7 +68,7 @@ public void configure( XmlSuite suite, Map options ) String parallel = options.get( PARALLEL_PROP ); if ( parallel != null ) { - suite.setParallel( parallel ); + suite.setParallel( XmlSuite.ParallelMode.getValidParallel( parallel ) ); } } -- 2.35.1