You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2020/06/20 08:37:36 UTC

[maven-integration-testing] branch MNG-5760 created (now 37167a6)

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

rfscholte pushed a change to branch MNG-5760
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git.


      at 37167a6  Simplify test cases for --resume/-r

This branch includes the following new commits:

     new 48324c8  Setup test project
     new 2886aac  Add first three integration tests
     new 40e0f6e  Conditionally fail each module
     new 37167a6  Simplify test cases for --resume/-r

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-integration-testing] 04/04: Simplify test cases for --resume/-r

Posted by rf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MNG-5760
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git

commit 37167a6bd969a6d037b7f94fd780c822c5954a50
Author: Maarten Mulders <ma...@infosupport.com>
AuthorDate: Fri May 22 15:32:55 2020 +0200

    Simplify test cases for --resume/-r
    
    Tests no longer verify whether a certain (implementation)
    file is there, and what its contents are. Instead, the test
    performs Maven invocations to verify the behaviour.
---
 .../maven/it/MavenITmng5760ResumeFeatureTest.java  | 75 ++++------------------
 1 file changed, 11 insertions(+), 64 deletions(-)

diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5760ResumeFeatureTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5760ResumeFeatureTest.java
index d6b3d5c..aa001a0 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5760ResumeFeatureTest.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5760ResumeFeatureTest.java
@@ -23,16 +23,7 @@ import org.apache.maven.it.util.ResourceExtractor;
 
 import java.io.File;
 import java.io.IOException;
-import java.io.Reader;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
 import java.util.List;
-import java.util.Properties;
-import java.util.stream.StreamSupport;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
 
 /**
  * This is a collection of test cases for <a href="https://issues.apache.org/jira/browse/MNG-5760">MNG-5760</a>,
@@ -80,10 +71,11 @@ public class MavenITmng5760ResumeFeatureTest extends AbstractMavenIntegrationTes
         }
     }
 
-    public void testShouldCreateResumptionFile() throws Exception
+    public void testShouldSkipSuccessfulProjects() throws Exception
     {
         final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
-        verifier.addCliOption( "-Dmodule-b.fail=true" );
+        verifier.addCliOption( "-Dmodule-a.fail=true" );
+        verifier.addCliOption( "--fail-at-end");
 
         try
         {
@@ -92,43 +84,24 @@ public class MavenITmng5760ResumeFeatureTest extends AbstractMavenIntegrationTes
         }
         catch ( final VerificationException ve )
         {
-            final Path resumeProperties = Paths.get(testDir.getAbsolutePath(), "target", "resume.properties");
-            verifier.assertFilePresent( resumeProperties.toAbsolutePath().toString() );
-
-
-            Properties expected = new Properties();
-            expected.put( "resumeFrom", "org.apache.maven.its.mng5760:module-b");
-
-            verifyFileContainsProperties( resumeProperties, expected );
+            // Expected to fail.
         }
         finally
         {
             verifier.resetStreams();
         }
-    }
 
-    public void testShouldSkipSuccessfulProjects() throws Exception
-    {
-        final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
-        verifier.addCliOption( "-Dmodule-a.fail=true" );
-        verifier.addCliOption( "--fail-at-end");
+        verifier.getCliOptions().clear();
 
+        // Let module-b and module-c fail, if they would have been built...
+        verifier.addCliOption( "-Dmodule-b.fail=true" );
+        verifier.addCliOption( "-Dmodule-c.fail=true" );
+        // ... but adding -r should exclude those two from the build because the previous Maven invocation
+        // marked them as successfully built.
+        verifier.addCliOption( "-r" );
         try
         {
             verifier.executeGoal( "test" );
-            fail( "Expected this invocation to fail" );
-        }
-        catch ( final VerificationException ve )
-        {
-            final Path resumeProperties = Paths.get(testDir.getAbsolutePath(), "target", "resume.properties");
-            verifier.assertFilePresent( resumeProperties.toAbsolutePath().toString() );
-
-
-            Properties expected = new Properties();
-            expected.put( "resumeFrom", "org.apache.maven.its.mng5760:module-a");
-            expected.put( "excludedProjects", "org.apache.maven.its.mng5760:module-b, org.apache.maven.its.mng5760:module-c");
-
-            verifyFileContainsProperties( resumeProperties, expected );
         }
         finally
         {
@@ -156,30 +129,4 @@ public class MavenITmng5760ResumeFeatureTest extends AbstractMavenIntegrationTes
             }
         }
     }
-
-    /**
-     * Throws an exception if the specified {@link Properties} are not present in the file. Checks for both key and
-     * value of the expected properties to be present.
-     * @param path Path the a file
-     * @param expectedProperties Expected properties inside the specified file
-     * @throws VerificationException When the specified file could not be read.
-     */
-    private void verifyFileContainsProperties( Path path, Properties expectedProperties )
-            throws VerificationException
-    {
-        Properties foundProperties = new Properties();
-        try ( Reader reader = Files.newBufferedReader( path ) )
-        {
-            foundProperties.load( reader );
-        }
-        catch ( IOException e )
-        {
-            throw new VerificationException( "Could not verify contents of " + path.toString(), e );
-        }
-
-        expectedProperties.forEach( ( key, value ) -> {
-            assertThat( foundProperties.containsKey( key ), is( true ) );
-            assertThat( foundProperties.get( key ), is( value ) );
-        });
-    }
 }


[maven-integration-testing] 01/04: Setup test project

Posted by rf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MNG-5760
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git

commit 48324c87cced6b377640914f39a884ae6c57f6f8
Author: Maarten Mulders <ma...@infosupport.com>
AuthorDate: Fri May 22 09:58:57 2020 +0200

    Setup test project
---
 .../mng-5760-resume-feature/module-a/pom.xml       | 36 +++++++++++++
 .../mng-5760-resume-feature/module-b/pom.xml       | 36 +++++++++++++
 .../mng-5760-resume-feature/module-c/pom.xml       | 43 ++++++++++++++++
 .../test/resources/mng-5760-resume-feature/pom.xml | 59 ++++++++++++++++++++++
 4 files changed, 174 insertions(+)

diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/module-a/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/module-a/pom.xml
new file mode 100644
index 0000000..2fc5193
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5760-resume-feature/module-a/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>module-a</artifactId>
+
+    <parent>
+        <groupId>org.apache.maven.its.mng5760</groupId>
+        <artifactId>parent</artifactId>
+        <version>1.0</version>
+    </parent>
+
+</project>
diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/module-b/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/module-b/pom.xml
new file mode 100644
index 0000000..d415157
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5760-resume-feature/module-b/pom.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>module-b</artifactId>
+
+    <parent>
+        <groupId>org.apache.maven.its.mng5760</groupId>
+        <artifactId>parent</artifactId>
+        <version>1.0</version>
+    </parent>
+
+</project>
diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/module-c/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/module-c/pom.xml
new file mode 100644
index 0000000..708e1a4
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5760-resume-feature/module-c/pom.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>module-c</artifactId>
+
+    <parent>
+        <groupId>org.apache.maven.its.mng5760</groupId>
+        <artifactId>parent</artifactId>
+        <version>1.0</version>
+    </parent>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.maven.its.mng5760</groupId>
+            <artifactId>module-b</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>
diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/pom.xml b/core-it-suite/src/test/resources/mng-5760-resume-feature/pom.xml
new file mode 100644
index 0000000..ca797e0
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5760-resume-feature/pom.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.maven.its.mng5760</groupId>
+    <artifactId>parent</artifactId>
+    <version>1.0</version>
+
+    <packaging>pom</packaging>
+
+    <name>Maven Integration Test :: MNG-5760</name>
+    <description>
+        Tests for the --resume flag.
+    </description>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+    </properties>
+
+    <modules>
+        <module>module-a</module>
+        <module>module-b</module>
+        <module>module-c</module>
+    </modules>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.12</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+</project>


[maven-integration-testing] 02/04: Add first three integration tests

Posted by rf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MNG-5760
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git

commit 2886aac8de27ce558d761fba10a5d240cbb02065
Author: Maarten Mulders <ma...@infosupport.com>
AuthorDate: Fri May 22 10:00:16 2020 +0200

    Add first three integration tests
    
    * should suggest to resume without args
    * should create resumption file
    * should skip successful projects
---
 .../maven/it/MavenITmng5760ResumeFeatureTest.java  | 185 +++++++++++++++++++++
 1 file changed, 185 insertions(+)

diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5760ResumeFeatureTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5760ResumeFeatureTest.java
new file mode 100644
index 0000000..d6b3d5c
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5760ResumeFeatureTest.java
@@ -0,0 +1,185 @@
+package org.apache.maven.it;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Reader;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.List;
+import java.util.Properties;
+import java.util.stream.StreamSupport;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * This is a collection of test cases for <a href="https://issues.apache.org/jira/browse/MNG-5760">MNG-5760</a>,
+ * <code>--resume</code> / <code>-r</code> in case of build failures.
+ *
+ * The test uses a multi-module project with three modules:
+ * <ul>
+ *     <li>module-a</li>
+ *     <li>module-b</li>
+ *     <li>module-c</li> (depends on module-b)
+ * </ul>
+ *
+ * @author Maarten Mulders
+ * @author Martin Kanters
+ */
+public class MavenITmng5760ResumeFeatureTest extends AbstractMavenIntegrationTestCase {
+    private final File testDir;
+
+    public MavenITmng5760ResumeFeatureTest() throws IOException {
+        super( "[3.7.0,)" );
+        this.testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5760-resume-feature" );
+    }
+
+    /**
+     * Tests that the hint at the end of a failed build mentions <code>--resume</code> instead of <code>--resume-from</code>.
+     */
+    public void testShouldSuggestToResumeWithoutArgs() throws Exception
+    {
+        final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+        verifier.addCliOption( "-Dmodule-b.fail=true" );
+
+        try
+        {
+            verifier.executeGoal( "test" );
+            fail( "Expected this invocation to fail" );
+        }
+        catch ( final VerificationException ve )
+        {
+            verifier.verifyTextInLog( "mvn <args> -r" );
+            verifyTextNotInLog( verifier, "mvn <args> -rf :module-b" );
+        }
+        finally
+        {
+            verifier.resetStreams();
+        }
+    }
+
+    public void testShouldCreateResumptionFile() throws Exception
+    {
+        final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+        verifier.addCliOption( "-Dmodule-b.fail=true" );
+
+        try
+        {
+            verifier.executeGoal( "test" );
+            fail( "Expected this invocation to fail" );
+        }
+        catch ( final VerificationException ve )
+        {
+            final Path resumeProperties = Paths.get(testDir.getAbsolutePath(), "target", "resume.properties");
+            verifier.assertFilePresent( resumeProperties.toAbsolutePath().toString() );
+
+
+            Properties expected = new Properties();
+            expected.put( "resumeFrom", "org.apache.maven.its.mng5760:module-b");
+
+            verifyFileContainsProperties( resumeProperties, expected );
+        }
+        finally
+        {
+            verifier.resetStreams();
+        }
+    }
+
+    public void testShouldSkipSuccessfulProjects() throws Exception
+    {
+        final Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+        verifier.addCliOption( "-Dmodule-a.fail=true" );
+        verifier.addCliOption( "--fail-at-end");
+
+        try
+        {
+            verifier.executeGoal( "test" );
+            fail( "Expected this invocation to fail" );
+        }
+        catch ( final VerificationException ve )
+        {
+            final Path resumeProperties = Paths.get(testDir.getAbsolutePath(), "target", "resume.properties");
+            verifier.assertFilePresent( resumeProperties.toAbsolutePath().toString() );
+
+
+            Properties expected = new Properties();
+            expected.put( "resumeFrom", "org.apache.maven.its.mng5760:module-a");
+            expected.put( "excludedProjects", "org.apache.maven.its.mng5760:module-b, org.apache.maven.its.mng5760:module-c");
+
+            verifyFileContainsProperties( resumeProperties, expected );
+        }
+        finally
+        {
+            verifier.resetStreams();
+        }
+    }
+
+    /**
+     * Throws an exception if the text <strong>is</strong> present in the log.
+     *
+     * @param verifier the verifier to use
+     * @param text the text to assert present
+     * @throws VerificationException if text is not found in log
+     */
+    private void verifyTextNotInLog( Verifier verifier, String text )
+            throws VerificationException
+    {
+        List<String> lines = verifier.loadFile( verifier.getBasedir(), verifier.getLogFileName(), false );
+
+        for ( String line : lines )
+        {
+            if ( Verifier.stripAnsi( line ).contains( text ) )
+            {
+                throw new VerificationException( "Text found in log: " + text );
+            }
+        }
+    }
+
+    /**
+     * Throws an exception if the specified {@link Properties} are not present in the file. Checks for both key and
+     * value of the expected properties to be present.
+     * @param path Path the a file
+     * @param expectedProperties Expected properties inside the specified file
+     * @throws VerificationException When the specified file could not be read.
+     */
+    private void verifyFileContainsProperties( Path path, Properties expectedProperties )
+            throws VerificationException
+    {
+        Properties foundProperties = new Properties();
+        try ( Reader reader = Files.newBufferedReader( path ) )
+        {
+            foundProperties.load( reader );
+        }
+        catch ( IOException e )
+        {
+            throw new VerificationException( "Could not verify contents of " + path.toString(), e );
+        }
+
+        expectedProperties.forEach( ( key, value ) -> {
+            assertThat( foundProperties.containsKey( key ), is( true ) );
+            assertThat( foundProperties.get( key ), is( value ) );
+        });
+    }
+}


[maven-integration-testing] 03/04: Conditionally fail each module

Posted by rf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MNG-5760
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git

commit 40e0f6e5b07b241097b9037d6e13cdcbc2fa1281
Author: Maarten Mulders <ma...@infosupport.com>
AuthorDate: Fri May 22 13:52:17 2020 +0200

    Conditionally fail each module
---
 .../test/java/org/apache/maven/it/TestCase.java    | 36 ++++++++++++++++++++++
 .../test/java/org/apache/maven/it/TestCase.java    | 36 ++++++++++++++++++++++
 .../test/java/org/apache/maven/it/TestCase.java    | 36 ++++++++++++++++++++++
 3 files changed, 108 insertions(+)

diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/module-a/src/test/java/org/apache/maven/it/TestCase.java b/core-it-suite/src/test/resources/mng-5760-resume-feature/module-a/src/test/java/org/apache/maven/it/TestCase.java
new file mode 100644
index 0000000..503ccc6
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5760-resume-feature/module-a/src/test/java/org/apache/maven/it/TestCase.java
@@ -0,0 +1,36 @@
+package org.apache.maven.it;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.junit.Test;
+
+import static org.junit.Assert.fail;
+
+public class TestCase
+{
+    @Test
+    public void testCase()
+    {
+        if ( Boolean.getBoolean("module-a.fail") )
+        {
+            fail("Deliberately fail test case in module A");
+        }
+    }
+}
\ No newline at end of file
diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/module-b/src/test/java/org/apache/maven/it/TestCase.java b/core-it-suite/src/test/resources/mng-5760-resume-feature/module-b/src/test/java/org/apache/maven/it/TestCase.java
new file mode 100644
index 0000000..a624bcf
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5760-resume-feature/module-b/src/test/java/org/apache/maven/it/TestCase.java
@@ -0,0 +1,36 @@
+package org.apache.maven.it;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.junit.Test;
+
+import static org.junit.Assert.fail;
+
+public class TestCase
+{
+    @Test
+    public void testCase()
+    {
+        if ( Boolean.getBoolean("module-b.fail") )
+        {
+            fail("Deliberately fail test case in module B");
+        }
+    }
+}
\ No newline at end of file
diff --git a/core-it-suite/src/test/resources/mng-5760-resume-feature/module-c/src/test/java/org/apache/maven/it/TestCase.java b/core-it-suite/src/test/resources/mng-5760-resume-feature/module-c/src/test/java/org/apache/maven/it/TestCase.java
new file mode 100644
index 0000000..1cb0415
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5760-resume-feature/module-c/src/test/java/org/apache/maven/it/TestCase.java
@@ -0,0 +1,36 @@
+package org.apache.maven.it;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.junit.Test;
+
+import static org.junit.Assert.fail;
+
+public class TestCase
+{
+    @Test
+    public void testCase()
+    {
+        if ( Boolean.getBoolean("module-c.fail") )
+        {
+            fail("Deliberately fail test case in module C");
+        }
+    }
+}
\ No newline at end of file