speed up junit (issue 6250057)

2 views
Skip to first unread message

fel...@gmail.com

unread,
May 24, 2012, 9:43:37 PM5/24/12
to meta...@gmail.com, ihab...@gmail.com, google-ca...@googlegroups.com, re...@codereview-hr.appspotmail.com
Reviewers: metaweta, ihab.awad,

Description:
We're running junit with fork="yes" because we want the junit vm to
have different properties than the ant vm. However, we're spawning
a new vm for each junit test, which is unnecessary.

This adds forkmode="once" to the junit tests.

This reduces 'ant runtests' on my laptop from about 11 minutes to
about 7 minutes.

Please review this at http://codereview.appspot.com/6250057/

Affected files:
M build.xml


Index: build.xml
===================================================================
--- build.xml (revision 4888)
+++ build.xml (working copy)
@@ -234,7 +234,7 @@
</target>

<target name="RuntestsRunDefault">
- <junit printsummary="yes" fork="yes" maxmemory="512m">
+ <junit printsummary="yes" fork="yes" forkmode="once" maxmemory="512m">
<assertions><enable/></assertions> <!-- ignored unless fork="yes"
-->
<jvmarg line="${jvmarg}"/>
<classpath refid="classpath.tests.run"/>
@@ -262,7 +262,7 @@
</target>

<target name="RuntestsRunGwtBeans">
- <junit printsummary="yes" fork="yes" maxmemory="512m">
+ <junit printsummary="yes" fork="yes" forkmode="once" maxmemory="512m">
<sysproperty key="user.language" value="tr"/>
<sysproperty key="user.region" value="TR"/>
<sysproperty key="test.method.filter" value="${test.method.filter}"/>


meta...@gmail.com

unread,
May 24, 2012, 10:24:19 PM5/24/12
to fel...@gmail.com, ihab...@gmail.com, google-ca...@googlegroups.com, re...@codereview-hr.appspotmail.com
Reply all
Reply to author
Forward
0 new messages