提交 f1205fa4 编写于 作者: J Jesse Glick

Copy basic Surefire configuration, esp. forkCount=2, to the plugin POM.

Shaves >11min off the test time for maven-plugin on my machine!
上级 261f4053
......@@ -31,6 +31,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<concurrency>2</concurrency> <!-- may use e.g. 2C for 2 × (number of cores) -->
</properties>
<dependencies>
......@@ -158,7 +159,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<!-- version specified in grandparent pom -->
<version>2.16</version>
<configuration>
<systemProperties>
<property>
......@@ -166,6 +167,9 @@
<value>33849</value>
</property>
</systemProperties>
<reuseForks>true</reuseForks>
<forkCount>${concurrency}</forkCount>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
</plugin>
<plugin>
......
......@@ -348,7 +348,7 @@ THE SOFTWARE.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.15</version> <!-- ignoring ${maven-surefire-plugin.version} -->
<version>2.16</version> <!-- ignoring ${maven-surefire-plugin.version} -->
<configuration>
<systemPropertyVariables>
<java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
......
......@@ -94,6 +94,7 @@ final class WarExploder {
if(!timestamp.exists() || (timestamp.lastModified()!=war.lastModified())) {
System.out.println("Exploding jenkins.war at "+war);
new FilePath(explodeDir).deleteRecursive();
// TODO this can fail (race condition?) when running tests in parallel; need a three-state flag, and switch to a different explodeDir as needed
new FilePath(war).unzip(new FilePath(explodeDir));
if(!explodeDir.exists()) // this is supposed to be impossible, but I'm investigating HUDSON-2605
throw new IOException("Failed to explode "+war);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册