You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2020/12/26 14:15:51 UTC

[maven-integration-testing] branch MNG-5760_fix updated (73f3748 -> a6954b9)

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

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


 discard 73f3748  [MNG-5760] Add `-r/--resume` to automatically resume from the last failure point
     new a6954b9  [MNG-5760] Add `-r/--resume` to automatically resume from the last failure point

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (73f3748)
            \
             N -- N -- N   refs/heads/MNG-5760_fix (a6954b9)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 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.


Summary of changes:


[maven-integration-testing] 01/01: [MNG-5760] Add `-r/--resume` to automatically resume from the last failure point

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

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

commit a6954b96e651e36f8f2804776017776c87041069
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat Dec 26 14:51:12 2020 +0100

    [MNG-5760] Add `-r/--resume` to automatically resume from the last failure point
    
    Use a fresh, preconfigured verifier and do not clear CLI options because
    on clear all preconfigurations, especially global settings are gone.
    
    This issue can be observed when Maven is ran with MNG-4645 where
    preconfigured Maven Central is lost in global settings.
    
    This closes #93
---
 .../apache/maven/it/MavenITmng5760ResumeFeatureTest.java  | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 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 9a339f2..d4cbab9 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
@@ -59,7 +59,7 @@ public class MavenITmng5760ResumeFeatureTest extends AbstractMavenIntegrationTes
      */
     public void testShouldSuggestToResumeWithoutArgs() throws Exception
     {
-        final Verifier verifier = newVerifier( parentDependentTestDir.getAbsolutePath() );
+        Verifier verifier = newVerifier( parentDependentTestDir.getAbsolutePath() );
         verifier.addCliOption( "-Dmodule-b.fail=true" );
 
         try
@@ -78,17 +78,18 @@ public class MavenITmng5760ResumeFeatureTest extends AbstractMavenIntegrationTes
         }
 
         // New build with -r should resume the build from module-b, skipping module-a since it has succeeded already.
-        verifier.getCliOptions().clear();
+        verifier = newVerifier( parentDependentTestDir.getAbsolutePath() );
         verifier.addCliOption( "-r" );
         verifier.executeGoal( "test" );
         verifyTextNotInLog( verifier, "Building module-a 1.0" );
         verifier.verifyTextInLog( "Building module-b 1.0" );
         verifier.verifyTextInLog( "Building module-c 1.0" );
+        verifier.resetStreams();
     }
 
     public void testShouldSkipSuccessfulProjects() throws Exception
     {
-        final Verifier verifier = newVerifier( parentDependentTestDir.getAbsolutePath() );
+        Verifier verifier = newVerifier( parentDependentTestDir.getAbsolutePath() );
         verifier.addCliOption( "-Dmodule-a.fail=true" );
         verifier.addCliOption( "--fail-at-end");
 
@@ -106,9 +107,8 @@ public class MavenITmng5760ResumeFeatureTest extends AbstractMavenIntegrationTes
             verifier.resetStreams();
         }
 
-        verifier.getCliOptions().clear();
-
         // Let module-b and module-c fail, if they would have been built...
+        verifier = newVerifier( parentDependentTestDir.getAbsolutePath() );
         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
@@ -129,7 +129,7 @@ public class MavenITmng5760ResumeFeatureTest extends AbstractMavenIntegrationTes
         // In this multi-module project, the submodules are not dependent on the parent.
         // This results in the parent to be built last, and module-a to be built first.
         // This enables us to let the first module in the reactor (module-a) fail.
-        final Verifier verifier = newVerifier( parentIndependentTestDir.getAbsolutePath() );
+        Verifier verifier = newVerifier( parentIndependentTestDir.getAbsolutePath() );
         verifier.addCliOption( "-Dmodule-a.fail=true" );
         verifier.addCliOption( "--fail-at-end");
 
@@ -147,11 +147,12 @@ public class MavenITmng5760ResumeFeatureTest extends AbstractMavenIntegrationTes
             verifier.resetStreams();
         }
 
-        verifier.getCliOptions().clear();
+        verifier = newVerifier( parentIndependentTestDir.getAbsolutePath() );
         verifier.addCliOption( "-r" );
         verifier.executeGoal( "test" );
         verifier.verifyTextInLog( "Building module-a 1.0" );
         verifyTextNotInLog( verifier, "Building module-b 1.0" );
+        verifier.resetStreams();
     }
 
     public void testShouldNotCrashWithoutProject() throws Exception