Sets a defaultInstance for WireMock server
without this change we're not resetting default instances upon test finish with this change we're resetting the default intance and setting it once more upon configuration startup fixes gh-1081
This commit is contained in:
@@ -119,6 +119,9 @@ public class WireMockConfiguration implements SmartLifecycle {
|
||||
if (!this.beanFactory.containsBean(WIREMOCK_SERVER_BEAN_NAME)) {
|
||||
this.beanFactory.registerSingleton(WIREMOCK_SERVER_BEAN_NAME, this.server);
|
||||
}
|
||||
if (isRunning()) {
|
||||
updateCurrentServer();
|
||||
}
|
||||
}
|
||||
|
||||
private void logRegisteredMappings() {
|
||||
@@ -130,6 +133,7 @@ public class WireMockConfiguration implements SmartLifecycle {
|
||||
|
||||
void resetMappings() {
|
||||
this.server.resetAll();
|
||||
WireMock.reset();
|
||||
logRegisteredMappings();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user