-
1. Re: Test timeout in arquillian
aslak Mar 9, 2012 10:13 AM (in response to danielmeyer)Automatically undeployed?
hmm, that sounds very odd. What does your test look like?
-
2. Re: Test timeout in arquillian
danielmeyer Mar 9, 2012 10:20 AM (in response to aslak)Yes, it looks like the container deployment is taken down at about 60s.
I am using Arquillian to take a larger testsuite to the container and then manually run junit 3 inside the test.
So from the perspective of arquillian (and junit4) the whole thing looks like a single testcase which, when executed, spawns junit 3 and executes about 900 tests inside the container, collects the results and returns.
I will check whether I can reproduce it with a test which just does Thread.sleep(2*60*1000);
-
3. Re: Test timeout in arquillian
danielmeyer Mar 9, 2012 10:27 AM (in response to danielmeyer)I can reproduce it with this:
@RunWith(Arquillian.class)
public class TestLongTest {
@Deployment
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class, "testsuite.war");
}
@Test
public void runLongRunningTest() throws Exception {
Thread.sleep(2*60*1000);
}
}
-
4. Re: Test timeout in arquillian
aslak Mar 9, 2012 11:03 AM (in response to danielmeyer)Aa right, I see. It would seem you're running into some kind of Socket/RMI timeout, being the default protocol used by JBoss AS 7 is MBean/RMI based, while WebSphere use the Servlet Protocol which is HTTP based.
As a workaround, you can configure the JBoss AS 7 Adaptor to use the Servlet Protocol instead.
Add the artifact org.jboss.arquillian.protocol:arquillian-protocol-servlet to classpath, and either add @Deployment @OverProtocol("Servlet 3.0") to your deployment method, or to override it globally add the defaultProtocol element in arquillian.xml:
-
5. Re: Test timeout in arquillian
danielmeyer Mar 9, 2012 11:23 AM (in response to aslak)Perfect, this solved my Problem!
Thanks a lot.
Regards,
Daniel
-
6. Re: Test timeout in arquillian
nagyga1 Mar 20, 2012 10:38 AM (in response to aslak)This way the timeout appears to be 5 minutes.
Was no timeout in 7.0.2.Final, at least I have never bumped into any.
-
7. Re: Test timeout in arquillian
nagyga1 Mar 21, 2012 5:15 AM (in response to nagyga1)Sorry, I've hit the default transaction timeout, my bad.
-
8. Re: Test timeout in arquillian
paul.robinson Sep 7, 2012 11:36 AM (in response to aslak)Aslak,
Can the timeout be raised for the JMX protocol? We can't use the Servlet protocol due to the issue I raise here: http://community.jboss.org/thread/204014
Paul.
-
9. Re: Test timeout in arquillian
paul.robinson Sep 7, 2012 12:31 PM (in response to paul.robinson)Yes, the timeout can be raised.
See the following code: http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss.remotingjmx/remoting-jmx/1.0.3.Final/org/jboss/remotingjmx/protocol/v1/ClientConnection.java
Here you see the default timeout is 60s, which is what we are seeing here. Use the org.jboss.remoting-jmx.timeout system property to override to an apropriate value.
Paul.