You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I explicitly set a port in @AutoConfigureWireMock(port = 8765), even 0 to randomly allocate a port, then it works - except for if I explicitly set it to 8080 (the default), then it no longer works
This used to work with Spring Boot 2.7 / Spring 5
I would expect it to set the property value to 8080 which is the WireMock default
Using version 4.0.3 of spring-cloud-contract-wiremock
The text was updated successfully, but these errors were encountered:
josephearl
changed the title
wiremock.server.port is not defined if port is not explicitly set
wiremock.server.port is not defined if port is not explicitly set or if it is set to 8080
Jul 10, 2023
Hello,
it seems that this fix lead to undesired behaviour by defaulting the server port always to 8080 after setting it once to a random port.
This block replaces the wiremock.server.port property even if it has been already set else { Map<String, Object> source = getWireMockSource(environment); source.put("wiremock.server.port", 8080); if (log.isDebugEnabled()) { log.debug("Registered WireMock server port property to the default <8080> value"); } }
could you please be kind and have a look on this issue?
Describe the bug
In my test I have something like:
With this I get an error:
If I explicitly set a port in
@AutoConfigureWireMock(port = 8765)
, even 0 to randomly allocate a port, then it works - except for if I explicitly set it to 8080 (the default), then it no longer worksThis used to work with Spring Boot 2.7 / Spring 5
I would expect it to set the property value to 8080 which is the WireMock default
Using version 4.0.3 of spring-cloud-contract-wiremock
The text was updated successfully, but these errors were encountered: