You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2020/06/05 10:40:23 UTC

[maven-surefire] branch empty_element_on_failure_with_ParameterizedTest updated: tests not in parallel so it fix the issue

This is an automated email from the ASF dual-hosted git repository.

olamy pushed a commit to branch empty_element_on_failure_with_ParameterizedTest
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/empty_element_on_failure_with_ParameterizedTest by this push:
     new f31c9bf  tests not in parallel so it fix the issue
f31c9bf is described below

commit f31c9bf95a558eda706054e1358b3d7b7798c99a
Author: olivier lamy <ol...@apache.org>
AuthorDate: Fri Jun 5 20:39:52 2020 +1000

    tests not in parallel so it fix the issue
    
    Signed-off-by: olivier lamy <ol...@apache.org>
---
 .../its/JUnitPlatformRerunFailingTestsIT.java      |  9 ++++++
 .../junit-platform-rerun-failing-tests/pom.xml     | 34 +++++++++++++++++++++-
 2 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformRerunFailingTestsIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformRerunFailingTestsIT.java
index 2a3bdca..c9e5190 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformRerunFailingTestsIT.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/JUnitPlatformRerunFailingTestsIT.java
@@ -203,6 +203,15 @@ public class JUnitPlatformRerunFailingTestsIT extends SurefireJUnit4IntegrationT
         verifyFailuresOneRetryOneMethod( outputValidator );
     }
 
+    @Test
+    public void testParameterizedTest()
+    {
+        OutputValidator outputValidator = unpack().setJUnitVersion( VERSION ).maven().addGoal(
+            "-Pparameters" ).withFailure().debugLogging().executeTest()
+            .assertTestSuiteResults( 6, 0, 1, 1, 0 );
+
+    }
+
     private void verifyFailuresOneRetryAllClasses( OutputValidator outputValidator )
     {
         verifyFailuresOneRetry( outputValidator, 5, 1, 1, 0 );
diff --git a/surefire-its/src/test/resources/junit-platform-rerun-failing-tests/pom.xml b/surefire-its/src/test/resources/junit-platform-rerun-failing-tests/pom.xml
index 3a8928a..cea4be0 100644
--- a/surefire-its/src/test/resources/junit-platform-rerun-failing-tests/pom.xml
+++ b/surefire-its/src/test/resources/junit-platform-rerun-failing-tests/pom.xml
@@ -49,13 +49,45 @@
     </dependencies>
 
     <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>${surefire.version}</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
-                <version>${surefire.version}</version>
+                <configuration>
+                    <excludes>
+                        <exclude>**/ParametersTest.java</exclude>
+                    </excludes>
+                </configuration>
             </plugin>
         </plugins>
     </build>
+    <profiles>
+        <profile>
+            <id>parameters</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <excludes>
+                                <exclude>**/PassingTest.java</exclude>
+                                <exclude>**/FlakyFirstTimeTest.java</exclude>
+                            </excludes>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 
 </project>