MAde tests less brittle

This commit is contained in:
Marcin Grzejszczak
2019-11-08 11:00:50 +01:00
parent 1128449c2d
commit cacd9bb938
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'() {