Manan Girdhar
01/30/2023, 9:26 AMRob Elliot
01/30/2023, 10:25 AMManan Girdhar
01/30/2023, 10:32 AMRob Elliot
01/30/2023, 10:33 AMManan Girdhar
01/30/2023, 10:37 AMorg.eclipse.jetty.util.log.StdErrLog logger = new org.eclipse.jetty.util.log.StdErrLog();
logger.setLevel(org.eclipse.jetty.util.log.StdErrLog.LEVEL_OFF);
org.eclipse.jetty.util.log.Log.setLog(logger);
wireMockServer = new WireMockServer(options().usingFilesUnderDirectory(getDirectoryLocation(toolName)).port(randomWiremockPort())); //No-args constructor will start on port 8080, no HTTPS
wireMockServer.start();
Rob Elliot
01/30/2023, 10:38 AMManan Girdhar
01/30/2023, 10:38 AMRob Elliot
01/30/2023, 10:46 AM<http://localhost>:<random_port>
because you are using .port(randomWiremockPort())
- I think randomWiremockPort()
must be your own logic, it's not a WireMock function.options().dynamicPort()
.
You can get the port from WireMock - wireMockServer.port()
will return it so you can print it.Manan Girdhar
02/07/2023, 6:29 AM