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"
<arg line="-testPluginName ${plugin-name}"/>
<arg line="-className ${classname}"/>

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.



Henrik Lindberg wrote:
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

cross-project-issues-dev mailing list

Nick Boldt ::
Release Engineer :: Eclipse Modeling & Dash Athena

Back to the top