spring-cloud / spring-cloud-contract

Support for Consumer Driven Contracts in Spring
https://cloud.spring.io/spring-cloud-contract
Apache License 2.0
718 stars 439 forks source link

wiremock.server.port is always defaulting to 8080 #2074

Closed mohamed-asfour closed 8 months ago

mohamed-asfour commented 8 months ago

Describe the bug

It seems that the change provided in this bug led 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?

affected Version: 3.1.9

Thanks in Advance

svetlana-nikitina commented 8 months ago

@marcingrzejszczak thanks a lot for fixing, waiting for release is the milestone correct though?

marcingrzejszczak commented 8 months ago

Argh, it's not, thanks for checking