Paul Holding created ARQ-2003:
---------------------------------
Summary: Arquillian Graphene/Drone tests use wrong port to access WebLogic
managed server
Key: ARQ-2003
URL:
https://issues.jboss.org/browse/ARQ-2003
Project: Arquillian
Issue Type: Bug
Components: WebLogic Containers
Environment: WebLogic version 12.2.1
arquillian-wls-remote-rest version 1.0.0.Final
arquillian-bom version 1.1.10.Final
arquillian-drone-bom version 1.3.1.Final
arquillian-drone-bom version 2.0.3 Final
The Arquillian integraition test and the WebLogic container are running on different
hosts.
Reporter: Paul Holding
Assignee: Vineet Reynolds
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|https://github.com/arquillian/arquillian-container-wls/blob/mas...]
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:
{code:java}
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-wls-remote-rest</artifactId>
<version>1.0.0.Final</version>
</dependency>
{code}
The entry in my arquillian.xml file is as follows:
{code:java}
<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>
{code}
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.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)