Sinan Pehlivanoglu
01/17/2023, 5:43 PMNot listening on HTTP port. Either HTTP is not enabled or the WireMock server is stopped.
java.lang.IllegalStateException: Not listening on HTTP port. Either HTTP is not enabled or the WireMock server is stopped.
at wiremock.com.google.common.base.Preconditions.checkState(Preconditions.java:444)
at com.github.tomakehurst.wiremock.WireMockServer.port(WireMockServer.java:179)
Found this: https://github.com/bakdata/fluent-kafka-streams-tests/issues/22 and this: https://groups.google.com/g/wiremock-user/c/4kkOMn58CzM?pli=1
JUnit version 4.13.2
testImplementation "junit:junit:4.13.2"
Being going through the recently merged code to see what could have caused this in the past 24 hours but I can't quite tell.
private Environment newEnvironmentInstance(.....) {
.... some code here ....
final WireMockConfiguration config = wireMockConfig().dynamicPort();
final WireMockServer mockServer = new WireMockServer(config);
environment.setUrl(URI.create("<http://localhost>:" + mockServer.port()));
environment.setService(URI.create("<http://localhost>:" + mockServer.port()));
environment.setInitial(initial);
<http://logger.info|logger.info>("Environment started: {} on port {} ({})",
environment.getId(), mockServer.port(), environment.getName());
mockServer.start();
mockServer.stubFor(.....)
}
Any thoughts what might have caused this?