jenkins-bot has submitted this change and it was merged.

Change subject: Updated test configuration
......................................................................


Updated test configuration

A couple of testing configuration changes in maven:
1. Correctly output reports for both unit and integration tests.
2. Fork multiple JVMs to run unit tests in parallel. Integration tests
can't because they share resources.
3. Upgrade the junit4 maven plugin. It now provides a progress indicator
that looks like:
[14:40:39.470] Completed [1/2] on J1 in 0.94s, 5 tests

Change-Id: If0acab3ea0d4a1c0373c80268aecff8c1b70c5fd
---
M .gitignore
M pom.xml
2 files changed, 31 insertions(+), 3 deletions(-)

Approvals:
  Jdouglas: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.gitignore b/.gitignore
index 7e54b9b..1be1555 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@
 *.iml
 .idea
 **/rules.log
+.execution-hints-*.log
diff --git a/pom.xml b/pom.xml
index 10c2ecf..c94e5c5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -132,7 +132,7 @@
         <plugin>
           <groupId>com.carrotsearch.randomizedtesting</groupId>
           <artifactId>junit4-maven-plugin</artifactId>
-          <version>2.1.2</version>
+          <version>2.1.13</version>
           <configuration>
             <heartbeat>20</heartbeat>
             <jvmOutputAction>pipe,warn</jvmOutputAction>
@@ -140,6 +140,7 @@
             <assertions>
               <enable />
             </assertions>
+            <seed>${tests.seed}</seed>
             <jvmArgs>
               <param>-Xmx512m</param>
             </jvmArgs>
@@ -158,6 +159,24 @@
                 <excludes>
                   <exclude>**/*IntegrationTest.class</exclude>
                 </excludes>
+                <!-- Use as many JVMs as the test runner wants to use. -->
+                <parallelism>auto</parallelism>
+                <!-- The listeners and balancers elements do three things:
+                  1. Control how output is formatted during tests
+                  2. Dump the report to the right spot
+                  3. Log an "execution-hints" file that is used to balance the 
load when tests are forked.  -->
+                <listeners>
+                  <report-ant-xml mavenExtensions="true" 
dir="${project.build.directory}/surefire-reports" />
+                  <report-text showThrowable="true" showStackTraces="true" 
showOutput="onerror"
+                    showStatusOk="false" showStatusError="true" 
showStatusFailure="true" showStatusIgnored="true"
+                    showSuiteSummary="true" timestamps="true" />
+                  <report-execution-times historyLength="20" 
file="${basedir}/.execution-hints-${project.version}.log" />
+                </listeners>
+                <balancers>
+                  <execution-times>
+                    <fileset dir="${basedir}" 
includes="${basedir}/.execution-hints-${project.version}.log"/>
+                  </execution-times>
+                </balancers>
               </configuration>
             </execution>
             <execution>
@@ -173,6 +192,14 @@
                 <excludes>
                   <exclude>**/*UnitTest.class</exclude>
                 </excludes>
+                <!-- Use only a single JVM so we don't interfere with 
ourselves. -->
+                <parallelism>1</parallelism>
+                <listeners>
+                  <report-ant-xml mavenExtensions="true" 
dir="${project.build.directory}/failsafe-reports" />
+                  <report-text showThrowable="true" showStackTraces="true" 
showOutput="onerror"
+                    showStatusOk="false" showStatusError="true" 
showStatusFailure="true" showStatusIgnored="true"
+                    showSuiteSummary="true" timestamps="true" />
+                </listeners>
               </configuration>
             </execution>
           </executions>
@@ -282,13 +309,13 @@
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.11</version>
+      <version>4.12</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>com.carrotsearch.randomizedtesting</groupId>
       <artifactId>randomizedtesting-runner</artifactId>
-      <version>2.1.10</version>
+      <version>2.1.13</version>
       <scope>test</scope>
     </dependency>
     <dependency>

-- 
To view, visit https://gerrit.wikimedia.org/r/204562
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If0acab3ea0d4a1c0373c80268aecff8c1b70c5fd
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Manybubbles <never...@wikimedia.org>
Gerrit-Reviewer: Jdouglas <jdoug...@wikimedia.org>
Gerrit-Reviewer: Smalyshev <smalys...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to