Clearing servers before the test

This commit is contained in:
Marcin Grzejszczak
2019-11-05 18:01:17 +01:00
parent 54ba67c449
commit 36348da595
2 changed files with 5 additions and 0 deletions

View File

@@ -22,4 +22,8 @@ class WireMockHttpServerStubAccessor {
assert WireMockHttpServerStub.SERVERS.every { it.value.random }
return true
}
static void clear() {
WireMockHttpServerStub.SERVERS.clear()
}
}

View File

@@ -74,6 +74,7 @@ class StubRunnerConfigurationSpec extends Specification {
void setupProps() {
System.clearProperty("stubrunner.repository.root")
System.clearProperty("stubrunner.classifier")
WireMockHttpServerStubAccessor.clear()
}
def 'should mark all ports as random'() {