3 Replies Latest reply on Jan 28, 2014 9:50 AM by tim.kutz

    Arquillian hanging on JBoss AS7.2 startup

    tim.kutz

      I'm having an issue with Arquillian tests, where the test seems to not register the fact that the JBoss server has started up.  These tests were working correctly last week, but stopped when I switched version 1.0.0.Alpha6 to 1.0.0.Final-SNAPSHOT of the arquillian-persistence extension.  Once that change was made, the one set of tests is running fine, but another set of tests in a different module now will not run at all.  Even when I revert that module back to 1.0.0.Alpha6, it continues to exhibit the same behavior.  When the first Arquillian test starts up, JBoss starts correctly, but the test appears to not detect it, failing with a timeout:

       

       

      Caused by: java.util.concurrent.TimeoutException: Managed server was not started within [60] s

        at org.jboss.as.arquillian.container.managed.ManagedDeployableContainer.startInternal(ManagedDeployableContainer.java:176)

        ... 68 more

       

      The two modules in question have identical Arquillian.xml files, which look like this:

       

      <arquillian xmlns="http://jboss.org/schema/arquillian"  
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
          xsi:schemaLocation="  
              http://jboss.org/schema/arquillian  
              http://jboss.org/schema/arquillian/arquillian_1_0.xsd">  
          <defaultProtocol type="Servlet 3.0" />
          <container qualifier="jbossas-7-managed" default="true">
              <configuration>  
                  <property name="serverConfig">standalone-test.xml</property>
                  <property name="managementPort">10499</property>
              </configuration>  
          </container>  
        <extension qualifier="persistence">
        <property name="defaultDataSeedStrategy">INSERT</property>
        <property name="defaultCleanupStrategy">USED_ROWS_ONLY</property>
        <property name="defaultCleanupPhase">AFTER</property>
        <property name="defaultDataSource">java:/jdbc/summary_list_test</property>
        </extension>
        <extension qualifier="transaction">
           <property name="manager">java:jboss/UserTransaction</property>
        </extension>
        <extension qualifier="persistence-dbunit">
        <property name="excludePoi">true</property>
        <property name="qualifiedTableNames">false</property>
        <property name="skipOracleRecycleBinTables">true</property>
        <property name="tableType">TABLE</property>
        <property name="schema">SUMMARY_LIST</property>
        <property name="filterForeignKeysEnabled">false</property>
        </extension>
      </arquillian>  
      

       

      The managementPort setting is correct - we use a port offset of 500 for the test JBoss instance, so we can execute our tests while our local development server is still available.  I've seen a couple of other threads indicating similar behavior, including this Jira issue and this StackOverflow post, but nothing in there seemed to help.  The arquillian protocol version mentioned in the StackOverflow post is what we're already using, and as you can see, we aren't specifying the managementAddress at all, as we're accepting the default, there.

       

      I've inspected the effective POM from the two modules - the one that works, and the one that doesn't - and all of the Arquillian dependencies appear to be the same.  The one notable difference is that the working module is a JPA module, and uses WebArchives throughout the tests, while the one which does not is using EnterpriseArchives, as it is testing EJBs. 

       

      I have tried switching to the jmx-as7 protocol, but that didn't appear to make any difference, either.

       

      I'm really at a loss as to where to look next.