Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-2003

Arquillian Graphene/Drone tests use wrong port to access WebLogic managed server

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • WebLogic Containers
    • None

    Description

      When using Arquillian to perform integration tests in client mode for an archive that is deployed to a WebLogic 12c R2 container, the wrong port number is being used in the URL accessed by Arquillian Graphene/Drone. When the browser is launched by the test, the port assigned to the WebLogic Admin server is used rather than the port assigned the WebLogic Managed server, which means container returns an HTTP 404 error causing the test case to fail.

      I've worked through the code for the various Arquillian components and I believe I've found the root cause of the problem. The problem appears to be in the RESTUtils class of the "wls-common" module which contains the deploy(CommonWebLogicConfiguration config, Logger logger, Archive<?> archive) method which is responsible for deploying the archive to the WebLogic Managed server and returning the ProtocolMetaData back to Arquillian. The ProtocolMetaData is subsequently used by Arquillian Graphene/Drone to access the web page.

      Within this method is the following line of code HTTPContext httpContext = new HTTPContext(adminUrl.getHost(), adminUrl.getPort()); which used to build the ProtocolMetaData object. This means that the admin port is being used instead of the port assigned to the Managed server.

      Assuming I've correctly identified the root cause, I don't believe that this Arquillian container adapter can be used with WebLogic 12c R2. The same integration test works fine on other containers such as GlassFish and WildFly.

      The Maven dependency for the WebLogic container adapter in my POM file is as follows:

      <dependency>
          <groupId>org.jboss.arquillian.container</groupId>
          <artifactId>arquillian-wls-remote-rest</artifactId>
          <version>1.0.0.Final</version>
      </dependency>
      

      The entry in my arquillian.xml file is as follows:

      <container qualifier="arquillian-weblogic-rest">
          <configuration>
              <property name="adminUrl">http://xxxx:7001</property>
              <property name="adminUserName">weblogic</property>
              <property name="adminPassword">xxxx</property>
              <property name="target">wls_server_1</property>
          </configuration>
          <protocol type="Servlet 3.0">
              <property name="host">xxxx</property>
              <property name="port">8080</property>
          </protocol>
      </container>
      

      The version of WebLogic I'm using is 12.2.1

      As the WebLogic container is running on a separate host, I believe I need to use the REST adapter rather than the remote adapter, as the remote adapter appears to require the Arquillian test to run on the same host as the WebLogic container.

      Attachments

        Activity

          People

            vineet.reynolds_jira Vineet Reynolds (Inactive)
            paul.holding_jira Paul Holding (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: