Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-528

swarm.http.port and swarm.port.offset do not work with @ArquillianResource URL baseURL

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Done
    • 1.0.0.CR2
    • 2016.8
    • core
    • None

    Description

      First Example
      If you set the swarm port using either swarm.http.port or swarm.port.offset via arquillian.xml e.g.

          <container qualifier="wildfly-swarm" default="true">
              <configuration>
                  <property name="javaVmArguments">
                      -Dswarm.port.offset=1
                  </property>
              </configuration>
          </container>
      

      the arquillian swarm container is correctly started on the specified port/offset.

      The problem is that if you use:

      @ArquillianResource
      private URL baseURL;
      

      to retrieve the url the swarm container is accessible via it always returns http://localhost:8080.

      Second Example
      If you set the port property in arquillian.xml

          <container qualifier="wildfly-swarm" default="true">
              <configuration>
                  <property name="port">8081</property>
              </configuration>
          </container>
      

      it starts the swarm container on 8080 and

      @ArquillianResource
      private URL baseURL;
      

      returns http://localhost:8081

      Third Example
      Attempting to combine the port property and the offset does not work either e.g.

          <container qualifier="wildfly-swarm" default="true">
              <configuration>
                  <property name="javaVmArguments">
                      -Dswarm.port.offset=1
                  </property>
                  <property name="port">8081</property>
              </configuration>
          </container>
      

      the port/offset is ignored and the container is started on 8080, while

      @ArquillianResource
      private URL baseURL;
      

      returns http:localhost:8081

      note: while the examples above use swarm.port.offset, the same issue occurs if you use swarm.http.port

      Attachments

        Issue Links

          Activity

            People

              rhn-support-hbraun Heiko Braun
              ma6rl_jira Richard Lucas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: