Gal Gilboa
10/12/2023, 9:52 AMcom.github.tomakehurst.wiremock.common.FatalStartupException: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:9888
Caused by: java.lang.RuntimeException: java.io.IOException: Failed to bind to /0.0.0.0:9888
Caused by: java.io.IOException: Failed to bind to /0.0.0.0:9888
Caused by: java.net.BindException: Address already in use
it seems, that since the upgrade, the tests are acting as if they are running in parallel.
Any explanation/solution for this?
Thanks,
Gal.Tom
10/12/2023, 10:06 AMGal Gilboa
10/12/2023, 10:23 AMpublic void startAll() {
this.getMockServers().stream().forEach(mockServer -> mockServer.start());
<http://logger.info|logger.info>("Started mock servers");
}
this method is eventually(not directly) being called from a ‘beforeEach’ method of a class implementing the BeforeEachCallback, AfterEachCallback extentions
@Override
public void beforeEach(ExtensionContext context) throws Exception {
myservers.startAll()
}
the servers are define as follows:
WireMockServer wireMockServer = new WireMockServer(
WireMockConfiguration.wireMockConfig()
.port(proxy.getPort())
.extensions(PriorityPostServeAction.class)
.notifier(new ConsoleNotifier(true)));
mockServers.add(wireMockServer);
Tom
10/12/2023, 10:24 AMGal Gilboa
10/12/2023, 10:27 AM