1 Reply Latest reply on Oct 3, 2014 10:26 AM by Simon Jongsma

    Executing test on remote JBoss EAP 6.2 fails

    Simon Jongsma Newbie

      I am running tests against JBoss EAP 6.2.2 both local on Windows AND on a remote JBoss on Linux.

      For both servers I have separate maven profile's like this:

             <profiles>
                   <profile>
                          <id>unittest_local_jboss</id>
                          <dependencies>
                                <dependency>
                                       <groupId>nl.makelaarsuite</groupId>
                                       <artifactId>platform-testdatabase</artifactId>
                                       <version>2.5.1-SNAPSHOT</version>
                                       <type>pom</type>
                                       <scope>provided</scope>
                                </dependency>
                                <dependency>
                                       <groupId>org.jboss.spec</groupId>
                                       <artifactId>jboss-javaee-6.0</artifactId>
                                       <version>1.0.0.Final</version>
                                       <type>pom</type>
                                       <scope>provided</scope>
                                </dependency>
                                 <dependency>
                                <!-- See :https://docs.jboss.org/author/display/ARQ/JBoss+AS+7.1,+JBoss+EAP+6.0+-+Managed -->
                                       <groupId>org.jboss.as</groupId>
                                       <artifactId>jboss-as-arquillian-container-managed</artifactId>
                                       <scope>test</scope>
                                </dependency>
                                <dependency>
                                       <groupId>org.jboss.arquillian.protocol</groupId>
                                       <artifactId>arquillian-protocol-servlet</artifactId>
                                       <scope>test</scope>
                                </dependency>
                          </dependencies>
                          <build>
                                <plugins>
                                       <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                             <artifactId>maven-surefire-plugin</artifactId>
                                             <version>2.9</version>
                                             <configuration>
                                       <systemPropertyVariables>
                                       <arquillian.launch>jboss_eap6_local</arquillian.launch>
                                       </systemPropertyVariables>
                                                    <excludes>
                                                           <exclude>**/test/helper/*.java</exclude>
                                                    </excludes>
                                </configuration>
                                       </plugin>
                                </plugins>
                          </build>
                   </profile>
                   <profile>
                          <id>unittest_remote_jboss</id>
                          <activation>
                                <activeByDefault>true</activeByDefault>
                          </activation>
                          <dependencies>
                                <dependency>
                                       <groupId>nl.makelaarsuite</groupId>
                                       <artifactId>platform-testdatabase</artifactId>
                                       <version>2.5.1-SNAPSHOT</version>
                                       <type>pom</type>
                                       <scope>provided</scope>
                                </dependency>
                                <dependency>
                                       <groupId>org.jboss.spec</groupId>
                                       <artifactId>jboss-javaee-6.0</artifactId>
                                       <version>1.0.0.Final</version>
                                       <type>pom</type>
                                       <scope>provided</scope>
                                </dependency>
                                <dependency>
                                <!-- See: https://docs.jboss.org/author/display/ARQ/JBoss+AS+7.1,+JBoss+EAP+6.0+-+Remote -->
                                       <groupId>org.jboss.as</groupId>
                                       <artifactId>jboss-as-arquillian-container-remote</artifactId>
                                       <scope>test</scope>
                                </dependency>
                                <dependency>
                                       <groupId>org.jboss.arquillian.protocol</groupId>
                                       <artifactId>arquillian-protocol-servlet</artifactId>
      <!--                             <version>1.1.5.Final</version> -->
                                       <scope>test</scope>
                          </dependencies>
                          <build>
                                <plugins>
                                       <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                             <artifactId>maven-surefire-plugin</artifactId>
                                             <version>2.9</version>
                                             <configuration>
                                       <systemPropertyVariables>
                                       <arquillian.launch>jboss_eap6_remote</arquillian.launch>
                                       </systemPropertyVariables>
                                                    <excludes>
                                                           <exclude>**/test/helper/*.java</exclude>
                                                    </excludes>
                                </configuration>
                                       </plugin>
                                </plugins>
                          </build>
                   </profile>
             </profiles>
        <dependencyManagement>
          <dependencies>
       <dependency>
       <groupId>org.jboss.bom.eap</groupId>
       <artifactId>jboss-javaee-6.0-with-tools</artifactId>
       <version>6.2.0-redhat-1</version>
       <type>pom</type>
       <scope>import</scope>
                           </dependency>
                   </dependencies>
             </dependencyManagement>
      

       

      The arquillian.xml has two container specifications with qualifiers linked to each profile using arquillian.launch specs above.rquillian.launch

      <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" />
        <!-- Uncomment engine part below to have test archives exported to the file system for inspection -->  
        <engine>  
          <property name="deploymentExportPath">d:\Work</property>  
        </engine>  
           <container qualifier="jboss_eap6_remote" default="false">
           <!-- See: https://docs.jboss.org/author/display/ARQ/JBoss+AS+7.1,+JBoss+EAP+6.0+-+Remote -->
             <configuration>
                  <property name="managementAddress">reydon1.locgov.nl</property>
                  <property name="managementPort">9999</property>
                  <property name="username">admin</property>
                  <property name="password">Civility#01</property>
              </configuration>
          </container>
          <container qualifier="jboss_eap6_local" default="true">
             <!-- See :https://docs.jboss.org/author/display/ARQ/JBoss+AS+7.1,+JBoss+EAP+6.0+-+Managed -->
                   <configuration>
                           <property name="allowConnectingToRunningServer">true</property>
                           <property name="outputToConsole">true</property>
              </configuration>
          </container>
      </arquillian>
      

       

       

      When starting the test project from Eclipse with profile unittest_local_jboss all is working OK.

      When starting the same test project from Eclipse with profile unittest_remote_jboss the war is created and actually deployed against the remote jboss but all tests (one by one)  fail with the same error:

      (SurefireStarter.java:104)

        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)

      Caused by: java.lang.IllegalStateException: Error launching request at http://localhost:8080/test/ArquillianServletRunner?outputMode=serializedObject&className=nl.makelaarsuite.platform.charset.CharsetUtilsTest&methodName=specificTestsUnicodeToT61. No result returned

        at org.jboss.arquillian.protocol.servlet.ServletMethodExecutor.executeWithRetry(ServletMethodExecutor.java:139)

      .......................

      I tried to override the version of artifact arquillian-protocol-servlet  to 1.1.5.Final (the latest) but that made no difference.

      Any idea what is the problem here?

        • 1. Re: Executing test on remote JBoss EAP 6.2 fails
          Simon Jongsma Newbie

          Luckily I found the problem myself:

          The test.war is indeed deployed (this can be seen in JBoss Console while debugging) using port 9999, but initiating the tests is done with requests over port 8080.

          This port was closed on this particular remote server.

          Arquillian then (silently) decides without error message to send the request to localhost. There is no JBoss server running there so failure.

          I would suggest to give an error message that port 8080 is not available on the server where the test.war was just previously (successfully) deployed.