Sling
  1. Sling
  2. SLING-1404

Create Maven plugin to select port dynamically and use it in integration tests

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Launchpad Testing 6
    • Component/s: Testing
    • Labels:
      None

      Description

      Our launchpad/testing integration tests often fail on Hudson due to ports not being available to run the Sling server instance.

      I'll create a simple Maven plugin to select a port dynamically.

        Activity

        Hide
        Carsten Ziegeler added a comment -

        Why do we need an own plugin? I thought there are plugins available doing this.

        Show
        Carsten Ziegeler added a comment - Why do we need an own plugin? I thought there are plugins available doing this.
        Hide
        Bertrand Delacretaz added a comment -

        Correct - modified the launchpad/testing pom to use build-helper-maven-plugin:reserve-network-port in revision 915273, no need for our own plugin.

        Show
        Bertrand Delacretaz added a comment - Correct - modified the launchpad/testing pom to use build-helper-maven-plugin:reserve-network-port in revision 915273, no need for our own plugin.
        Hide
        Justin Edelson added a comment -

        This makes running integration tests from an IDE a pain. We should only use the assigned port for cargo (and the forthcoming launchpad:start goal), not the jetty plugin.

        Show
        Justin Edelson added a comment - This makes running integration tests from an IDE a pain. We should only use the assigned port for cargo (and the forthcoming launchpad:start goal), not the jetty plugin.
        Hide
        Bertrand Delacretaz added a comment -

        You mean when using "mvn jetty:run" ?
        Feel free to change that back to a fixed port, agree that it's more convenient.

        Show
        Bertrand Delacretaz added a comment - You mean when using "mvn jetty:run" ? Feel free to change that back to a fixed port, agree that it's more convenient.
        Hide
        Justin Edelson added a comment -

        yeah, when working on integration tests, I usually run mvn jetty:run from a shell and then run individual unit tests in my IDE.

        I'll fix this, as soon as I'm done with the integration test I'm troubleshooting

        Show
        Justin Edelson added a comment - yeah, when working on integration tests, I usually run mvn jetty:run from a shell and then run individual unit tests in my IDE. I'll fix this, as soon as I'm done with the integration test I'm troubleshooting
        Hide
        Justin Edelson added a comment -

        added jetty.http.port in r915492, default to 8888

        Show
        Justin Edelson added a comment - added jetty.http.port in r915492, default to 8888

          People

          • Assignee:
            Justin Edelson
            Reporter:
            Bertrand Delacretaz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development