Closed josephearl closed 11 months ago
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?
Thanks in Advance
Argh sorry. Can you open a new issue please? I guess as a workaround you should go with the dynamic approach.
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