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

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

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.0.0.CR2
    • Fix Version/s: 2016.8
    • Component/s: core
    • Labels:
      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  heiko.braun Heiko Braun
                  Reporter:
                  ma6rl Richard Lucas
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: