This message was deleted.
# help
s
This message was deleted.
t
Hi @Gal Gilboa how are you starting and stopping the WireMock server?
g
i am using the simple start/stop method on my server
Copy code
public 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
Copy code
@Override
public void beforeEach(ExtensionContext context) throws Exception {
 myservers.startAll()
}
the servers are define as follows:
Copy code
WireMockServer wireMockServer = new WireMockServer(
        WireMockConfiguration.wireMockConfig()
          .port(proxy.getPort())
          .extensions(PriorityPostServeAction.class) 
          .notifier(new ConsoleNotifier(true)));
      mockServers.add(wireMockServer);
t
Are you explicitly stopping them afterwards or just allowing them to be GC’d?
g
i am stopping them explicitly- the same way i have started them.
in the afterEach method