Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-1997

Prometheus Wiremock tests need to run on a randomized port

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2024-01-10 - API
    • None
    • None

      Running the tests with org.gradle.parallel=true (which is the default for our project) results in test failures as the tests contend over port 8101. Other teammates do not seem to have this issue, but it happens consistently for me. Setting the org.gradle.parallel=false in the gradle.properties file fixes the issue for me, but that's a suboptimal solution. The better solution is for PrometheusQueryWiremockExtension to start the WiremockServer on a randomized port. This is behavior is supported in the stock Wiremock extension and the port is passed in to the test method via a WireMockRuntimeInfo parameter. We need to do something similar in our tests and then configure the Spring and Quarkus components to use this randomized port.

              jcarvaja@redhat.com Jose Carvajal Hilario
              awood1@redhat.com Alex Wood
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: