mattrpav commented on code in PR #1541:
URL: https://github.com/apache/activemq/pull/1541#discussion_r2596600754


##########
activemq-mqtt/pom.xml:
##########
@@ -199,23 +204,74 @@
     </pluginManagement>
     <plugins>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>

Review Comment:
   Maven plugins do not require groupId by default.



##########
activemq-mqtt/pom.xml:
##########
@@ -199,23 +204,74 @@
     </pluginManagement>
     <plugins>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
+        <version>${surefire.version}</version>

Review Comment:
   surefire.version is managed from the parent pom, in pluginManagement. This 
shouldn't be needed.



##########
activemq-mqtt/pom.xml:
##########
@@ -199,23 +204,74 @@
     </pluginManagement>
     <plugins>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
+        <version>${surefire.version}</version>
         <configuration>
-          <forkCount>1</forkCount>
-          <reuseForks>false</reuseForks>
           <argLine>${surefire.argLine}</argLine>
           <runOrder>alphabetical</runOrder>
-           <systemPropertyValues>
-              
<org.apache.activemq.default.directory.prefix>target</org.apache.activemq.default.directory.prefix>
-           </systemPropertyValues>
-           <!-- includes>
-             <include>**/*Test.*</include>
-           </includes -->
-           <excludes>
-             <exclude>**/PahoMQTNioTTest.java</exclude>
-           </excludes>
+          <reportFormat>plain</reportFormat>
+          <failIfNoTests>false</failIfNoTests>
+          
<excludedGroups>org.apache.activemq.transport.mqtt.ParallelTest</excludedGroups>
+          <systemPropertyVariables>
+            <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
+            
<org.apache.activemq.AutoFailTestSupport.disableSystemExit>true</org.apache.activemq.AutoFailTestSupport.disableSystemExit>
+            
<org.apache.activemq.broker.jmx.createConnector>false</org.apache.activemq.broker.jmx.createConnector>
+            
<org.apache.activemq.default.directory.prefix>${project.build.directory}/</org.apache.activemq.default.directory.prefix>
+          </systemPropertyVariables>
+          <consoleOutputReporter>
+            <disable>true</disable>
+          </consoleOutputReporter>
+          <statelessTestsetInfoReporter
+            
implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoTreeReporter">
+            <printStacktraceOnError>true</printStacktraceOnError>
+            <printStacktraceOnFailure>true</printStacktraceOnFailure>
+            <printStdoutOnError>true</printStdoutOnError>
+            <printStdoutOnFailure>true</printStdoutOnFailure>
+            <printStderrOnError>true</printStderrOnError>
+            <printStderrOnFailure>true</printStderrOnFailure>
+          </statelessTestsetInfoReporter>
+          <excludes>
+            <exclude>**/PahoMQTNioTTest.java</exclude>
+          </excludes>
         </configuration>
+        <executions>
+          <execution>
+            <id>parallel</id>
+            <phase>test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <!-- drop the default excludedGroups -->
+              <excludedGroups combine.self="override"/>
+              <groups>org.apache.activemq.transport.mqtt.ParallelTest</groups>
+              <forkCount>2C</forkCount>
+              <reuseForks>false</reuseForks>
+              
<forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
+              <failIfNoTests>false</failIfNoTests>
+              <systemPropertyVariables>
+                
<org.apache.activemq.default.directory.prefix>${project.build.directory}/parallel-tests-${surefire.forkNumber}/</org.apache.activemq.default.directory.prefix>
+                <!-- when running MQTT tests in parallel in the CI (quite 
slow) we need to bump the wireformat negotiation timeout (5s by default) -->
+                
<org.apache.activemq.transport.wireFormatNegotiationTimeout>20000</org.apache.activemq.transport.wireFormatNegotiationTimeout>
+              </systemPropertyVariables>
+            </configuration>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.maven.surefire</groupId>
+            <artifactId>surefire-junit47</artifactId>
+            <version>${surefire.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>me.fabriciorby</groupId>
+            <artifactId>maven-surefire-junit5-tree-reporter</artifactId>
+            <version>1.5.1</version>

Review Comment:
   This plugin version should be added to parent pom.



##########
activemq-mqtt/pom.xml:
##########
@@ -28,6 +28,11 @@
   <artifactId>activemq-mqtt</artifactId>
   <packaging>jar</packaging>
   <name>ActiveMQ :: MQTT Protocol</name>
+
+  <properties>
+    <surefire.version>3.5.3</surefire.version>

Review Comment:
   maven-surefire-plugin version should be managed by the parent pom 
pluginManagement. This shouldn't be needed.



##########
activemq-mqtt/pom.xml:
##########
@@ -199,23 +204,74 @@
     </pluginManagement>
     <plugins>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
+        <version>${surefire.version}</version>
         <configuration>
-          <forkCount>1</forkCount>
-          <reuseForks>false</reuseForks>
           <argLine>${surefire.argLine}</argLine>
           <runOrder>alphabetical</runOrder>
-           <systemPropertyValues>
-              
<org.apache.activemq.default.directory.prefix>target</org.apache.activemq.default.directory.prefix>
-           </systemPropertyValues>
-           <!-- includes>
-             <include>**/*Test.*</include>
-           </includes -->
-           <excludes>
-             <exclude>**/PahoMQTNioTTest.java</exclude>
-           </excludes>
+          <reportFormat>plain</reportFormat>
+          <failIfNoTests>false</failIfNoTests>

Review Comment:
   Why set this? Seems like a trap where a config change could result in no 
tests running and not being detected unintentionally.



##########
activemq-mqtt/pom.xml:
##########
@@ -199,23 +204,74 @@
     </pluginManagement>
     <plugins>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
+        <version>${surefire.version}</version>
         <configuration>
-          <forkCount>1</forkCount>
-          <reuseForks>false</reuseForks>
           <argLine>${surefire.argLine}</argLine>
           <runOrder>alphabetical</runOrder>
-           <systemPropertyValues>
-              
<org.apache.activemq.default.directory.prefix>target</org.apache.activemq.default.directory.prefix>
-           </systemPropertyValues>
-           <!-- includes>
-             <include>**/*Test.*</include>
-           </includes -->
-           <excludes>
-             <exclude>**/PahoMQTNioTTest.java</exclude>
-           </excludes>
+          <reportFormat>plain</reportFormat>
+          <failIfNoTests>false</failIfNoTests>
+          
<excludedGroups>org.apache.activemq.transport.mqtt.ParallelTest</excludedGroups>
+          <systemPropertyVariables>
+            <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
+            
<org.apache.activemq.AutoFailTestSupport.disableSystemExit>true</org.apache.activemq.AutoFailTestSupport.disableSystemExit>
+            
<org.apache.activemq.broker.jmx.createConnector>false</org.apache.activemq.broker.jmx.createConnector>
+            
<org.apache.activemq.default.directory.prefix>${project.build.directory}/</org.apache.activemq.default.directory.prefix>
+          </systemPropertyVariables>
+          <consoleOutputReporter>
+            <disable>true</disable>
+          </consoleOutputReporter>
+          <statelessTestsetInfoReporter
+            
implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoTreeReporter">
+            <printStacktraceOnError>true</printStacktraceOnError>
+            <printStacktraceOnFailure>true</printStacktraceOnFailure>
+            <printStdoutOnError>true</printStdoutOnError>
+            <printStdoutOnFailure>true</printStdoutOnFailure>
+            <printStderrOnError>true</printStderrOnError>
+            <printStderrOnFailure>true</printStderrOnFailure>
+          </statelessTestsetInfoReporter>
+          <excludes>
+            <exclude>**/PahoMQTNioTTest.java</exclude>
+          </excludes>
         </configuration>
+        <executions>
+          <execution>
+            <id>parallel</id>
+            <phase>test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <!-- drop the default excludedGroups -->
+              <excludedGroups combine.self="override"/>
+              <groups>org.apache.activemq.transport.mqtt.ParallelTest</groups>
+              <forkCount>2C</forkCount>
+              <reuseForks>false</reuseForks>
+              
<forkedProcessTimeoutInSeconds>600</forkedProcessTimeoutInSeconds>
+              <failIfNoTests>false</failIfNoTests>

Review Comment:
   same as above



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to