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

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

commit 193175f51f85d00f4fc0da2a74bdbd83c2ab89cd
Author: Michael Osipov <micha...@apache.org>
AuthorDate: Sun Nov 8 19:42:30 2020 +0100

    [MNG-6890] MavenITmng5669ReadPomsOnce is unreliable
    
    Add explicit plugin versions to solve instability.
---
 .../maven/it/MavenITmng5669ReadPomsOnce.java       | 12 +++++-----
 .../src/test/resources/bootstrap/group-10/pom.xml  | 25 ++++++++++++++++++++
 .../test/resources/mng-5669-read-poms-once/pom.xml | 27 ++++++++++++++++++++++
 3 files changed, 58 insertions(+), 6 deletions(-)

diff --git 
a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java
 
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java
index 666b647..f3bb8e5 100644
--- 
a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java
+++ 
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5669ReadPomsOnce.java
@@ -74,10 +74,10 @@ public class MavenITmng5669ReadPomsOnce
                 break;
             }
         }
-        assertEquals( logTxt.toString(), 168, logTxt.size() );
+        assertEquals( logTxt.toString(), 224, logTxt.size() );
 
         // analyze lines. It is a Hashmap, so we can't rely on the order
-        Set<String> uniqueBuildingSources = new HashSet<>( 168 );
+        Set<String> uniqueBuildingSources = new HashSet<>( 224 );
         final String buildSourceKey = 
"org.apache.maven.model.building.source=";
         final int keyLength = buildSourceKey.length();
         for ( String line : logTxt )
@@ -95,7 +95,7 @@ public class MavenITmng5669ReadPomsOnce
             }
             uniqueBuildingSources.add( line.substring( start + keyLength, end 
) );
         }
-        assertEquals( uniqueBuildingSources.size(), 167 /* is 168 minus 
superpom */ );
+        assertEquals( uniqueBuildingSources.size(), 223 /* is 224 minus 
superpom */ );
     }
 
     public void testWithBuildConsumer()
@@ -127,11 +127,11 @@ public class MavenITmng5669ReadPomsOnce
                 break;
             }
         }
-        assertEquals( logTxt.toString(), 168 + 4 /* reactor poms are read 
twice: file + raw (=XMLFilters) */,
+        assertEquals( logTxt.toString(), 224 + 4 /* reactor poms are read 
twice: file + raw (=XMLFilters) */,
                       logTxt.size() );
 
         // analyze lines. It is a Hashmap, so we can't rely on the order
-        Set<String> uniqueBuildingSources = new HashSet<>( 168 );
+        Set<String> uniqueBuildingSources = new HashSet<>( 224 );
         final String buildSourceKey = 
"org.apache.maven.model.building.source=";
         final int keyLength = buildSourceKey.length();
         for ( String line : logTxt )
@@ -149,7 +149,7 @@ public class MavenITmng5669ReadPomsOnce
             }
             uniqueBuildingSources.add( line.substring( start + keyLength, end 
) );
         }
-        assertEquals( uniqueBuildingSources.size(), 167 /* is 168 minus 
superpom */ );
+        assertEquals( uniqueBuildingSources.size(), 223 /* is 224 minus 
superpom */ );
     }
 
 }
diff --git a/core-it-suite/src/test/resources/bootstrap/group-10/pom.xml 
b/core-it-suite/src/test/resources/bootstrap/group-10/pom.xml
index 674e5dd..4b2b5a5 100644
--- a/core-it-suite/src/test/resources/bootstrap/group-10/pom.xml
+++ b/core-it-suite/src/test/resources/bootstrap/group-10/pom.xml
@@ -44,5 +44,30 @@ under the License.
       <artifactId>plexus-utils</artifactId>
       <version>1.5.1</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-surefire-plugin</artifactId>
+      <version>3.0.0-M5</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-compiler-plugin</artifactId>
+      <version>3.8.1</version>
+    </dependency>
+       <dependency>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-jar-plugin</artifactId>
+      <version>3.2.0</version>
+       </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-resources-plugin</artifactId>
+      <version>3.2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugins</groupId>
+      <artifactId>maven-site-plugin</artifactId>
+      <version>3.3</version>
+    </dependency>
   </dependencies>
 </project>
diff --git a/core-it-suite/src/test/resources/mng-5669-read-poms-once/pom.xml 
b/core-it-suite/src/test/resources/mng-5669-read-poms-once/pom.xml
index bf11d6b..6d1b543 100644
--- a/core-it-suite/src/test/resources/mng-5669-read-poms-once/pom.xml
+++ b/core-it-suite/src/test/resources/mng-5669-read-poms-once/pom.xml
@@ -33,4 +33,31 @@ under the License.
     <module>module3</module>
   </modules>
 
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>3.2.0</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.1</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>3.0.0-M5</version>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>3.2.0</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
 </project>
\ No newline at end of file

Reply via email to