<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi all,<br>
<br>
I've had several requests on how to increase timeout for tests, here
is an explanation of how to achieve that:<br>
<br>
This property to control timeout is<b> surefire.timeout</b> (see
<a class="moz-txt-link-freetext" href="http://www.eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#forkedProcessTimeoutInSeconds">http://www.eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#forkedProcessTimeoutInSeconds</a>
). You can either set this property in command-line, by adding
-Dsurefire.timeout=xxxx when invoking Maven, or<i> in case this
timeout is more specific to your job than it is to your
environment</i>, by setting
<properties><surefire.timeout>xxxx</surefile.timeout></properties>
in your parent pom.<br>
In any case, please don't set this property directly in
configuration of the tycho-surefire-plugin, it will disable the
ability to configure it from command-line or properties.<br>
<br>
Here is how Maven behaves to resolve this property, and properties
in general:<br>
1. Maven looks at the command-line to set the surefire.timeout
property<br>
2. If not in command-line, Maven looks at the pom for the current
module to set the surefire.timeout property<br>
3. If not specified in neither comand-line nor module pom, looks in
parent to set the surefire.timeout property<br>
4. Continue from parent to parent until on specifies a value for the
property.<br>
5. The tycho-surefire-plugin looks for its
forkedProcessTimeoutInSeconds parameter. If there is a value, sets
it to this value, otherwise, sets it to the ${surefire.timeout}
property. If surefire.timeout is not set, tycho-surefilre-plugin
uses default (0 = no timeout).<br>
<br>
If you job has timeout on Jenkins, but not locally, you should
change the Jenkins configuration to add a -Dsurefire.timeout=xxxx to
Maven invocations (please note that each jobs invokes Maven twice:
one to build, and one to test, so you should change both).<br>
If your project has timeout both locally and or Maven, it's better
to set first a timeout in the pom.xml of the test which suffers from
the timeout so it can run locally. Then if necessary, set a bigger
value in Jenkins.<br>
<br>
In some cases, your build may be stuck. This will result on a
timeout, but timeout is the symptom not the issue. This can be the
consequence of either a bug in one test, either it happens to be a
configuration problem on CI machines. In case you can't solve that,
feel free to open a ticket to request help.<br>
<br>
Cheers,<br>
<div class="moz-signature">-- <br>
Mickael Istria<br>
Eclipse developer at <a href="http://www.jboss.org/tools">JBoss,
by Red Hat</a><br>
<a href="http://mickaelistria.wordpress.com">My blog</a> - <a
href="http://twitter.com/mickaelistria">My Tweets</a></div>
</body>
</html>