Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] Timeout when running tests

Yes, timeouts are supported for <java fork="true"/>.

From /cvsroot/eclipse/org.eclipse.test/library.xml:

<!--
   timeout - overrides default test timeout value (in milliseconds).
-->
...
<property name="timeout" value="7200000" />
...
<java fork="true" dir="." timeout="${timeout}"
jvm="${jvm}" logError="true"
classname="org.eclipse.core.launcher.Main">
...
<arg line="-testPluginName ${plugin-name}"/>
<arg line="-className ${classname}"/>
...
</java>

For Athena builds, we just use the default value of 7200000ms = 2hrs; however, you can set an individual build job in Hudson w/ a much shorter timeout if you want (eg., 30 mins), but that kills the whole build+tests, not just an individual misbehaving test.

PDT used to use a custom version of library.xml so they could set their own timeout rules; not sure what they do these days.

HTH,

Nick

Henrik Lindberg wrote:
Hi,
At one point, we found a test in p2 that was hung, and this led me to look into if it was possible to configure JUnit to timeout tests that take too long. I did some googling, and found that in JUnit 4 it is possible to set timeout per test using annotations - seems like a very nice feature. In JUnit 3 it seems like it is possible to configure the overall timeout behavior, but that something known as fork-mode must be used at the same time.

What are others doing wrt. to tests and timeouts. Is the Eclipse infrastructure set up to timeout long running tests?

Henrik Lindberg
henrik.lindberg@xxxxxxxxxxxxxx



_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev

--
Nick Boldt :: http://wiki.eclipse.org/User:Nickb
Release Engineer :: Eclipse Modeling & Dash Athena


Back to the top