1 Reply Latest reply on Oct 24, 2013 7:30 AM by Martin Varga

    java.lang.IllegalStateException: Error launching request

    Martin Varga Newbie

      I am running Arquillian 1.1.1.Final + TestNG in managed JBoss 7.1.1.Final. I have two simple test classes, both extend a common test class that extends Arquillian class. When I run them separately, they work just fine. When I run both of them, the one that is executed second, fails in few tests with the following cause:


      Caused by: java.lang.IllegalStateException: Error launching request at No result returned
          at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:139)
          at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.invoke(ServletMethodExecutor.java:99)
          ... 83 more


      I also tried restarting the server between the classes by using this in arquillian.xml:


        <property name="maxTestClassesBeforeRestart">1</property>


      But I get the same result.


      What "kind of" works is when I force order of the tests by using dependsOnMethod, but I prefer not to, because these two classes are just a tip of an iceberg. It makes me think that maybe there is some problem with parallel execution. However I use this config of my failsafe plugin. I am using failsafe, because there are already unit tests running from surefire, because we use testng suite files that arquillian ignores.





      Any ideas are greatly appreciated!

        • 1. Re: java.lang.IllegalStateException: Error launching request
          Martin Varga Newbie

          Here's a simple example of what fails:


          public abstract class ParentTest<T extends MyEntity> extends Arquillian {
            public static void testMethodThatDoesNotDependOnAnyone() {
            // bunch of test classes that use the annotation @Test(dependsOnMethods="previousMethod")
            public static void testMethodOne() {
            public static void testMethodTwo() {
            // more methods here
          public class ChildTestOne extends ParentTest<ExampleOne> {
          public class ChildTestTwo extends ParentTest<ExampleTwo> {


          The testMethodThatDoesNotDependOnAnyone will fail in one class (ChildTestOne) with the exception above. If I add testMethodAddedToProveMyPoint() both will fail. In the other class they will run just fine.


          Also setting maxTestClassesBeforeRestart to 1 doesn't work properly - both classes will be tested in the second JBoss start.