Hi,

laredotornado-3 wrote:

> Hi,
> 
> I’m using Maven 3.2.3, Spring 3.2.11.RELEASE, JUnit 4.11, Java 6, and the
> Surefire/Failsafe 2.17 plugins.  I’m trying to figure out why when running
> a couple of modules in parallel, it takes much longer than when I run them
> individually.  I’m trying to figure out ways to speed up my build.  I have
> this in my parent pom …
> 
>         <modules>
>                 <module>core</module>
>                 …
> <module>module-x</module>
>                 <module>module-y</module>
>         </modules>
> 
> When I run “mvn clean install -T 4”, modules “module-x” and “module-y” run
> in parallel.  Both have a number of integration tests, all using
> 
> @RunWith(SpringJUnit4ClassRunner.class)
> @ContextConfiguration({ "classpath:test-context.xml" })
> public class MyServiceIT
> {
> 
> Below are my surefire/failsafe configurations …
> 
>                         <plugin>
>                                 
<groupId>org.apache.maven.plugins</groupId>
>                                
> <artifactId>maven-surefire-plugin</artifactId>
>                                 <version>2.17</version>
>                                 <configuration>
>                                         <reuseForks>true</reuseForks>
>                                         <argLine>-Xmx2048m
> -XX:MaxPermSize=512M </argLine>
>                                        
> <skipTests>${skipAllTests}</skipTests>
>                                 </configuration>
>                         </plugin>
>                         <plugin>
>                                 
<groupId>org.apache.maven.plugins</groupId>
>                                
> <artifactId>maven-failsafe-plugin</artifactId>
>                                 <version>2.17</version>
>                                 <configuration>
>                                         <reuseForks>true</reuseForks>
>                                         <argLine>-Xmx4096m
> -XX:MaxPermSize=512M </argLine>
>                                        
> <skipTests>${skipAllTests}</skipTests>
>                                 </configuration>
>                                 <executions>
>                                         <execution>
>                                                 <goals>
>                                                        
> <goal>integration-test</goal>
>                                                         
<goal>verify</goal>
>                                                 </goals>
>                                         </execution>
>                                 </executions>
>                         </plugin>
> 
> When I run the tests in parallel, the modules take 11 minutes and 13
> minutes, respectively, to run.  However, running them concurrently
> (without the “-T” option), they execute in 6 minutes and 9 minutes,
> respectively. I’m confused about why they take so much longer to run when
> they both run at the same time and was hoping some folks could suggest
> some ways I can troubleshoot this further.

How much memory do you have? Your test processes take quite a lot and 
executing them in parallel might simply activate disk swapping.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to