kopia lustrzana https://github.com/JOSM/MapWithAI
MapWithAITestRules: Workaround double initialization
Signed-off-by: Taylor Smock <tsmock@fb.com>pull/1/head
rodzic
1d99028c93
commit
a142ded362
|
@ -125,6 +125,9 @@ public class MapWithAITestRules extends JOSMTestRules {
|
|||
wireMock = new WireMockServer(options().usingFilesUnderDirectory("test/resources/wiremock")
|
||||
.extensions(new WireMockUrlTransformer()).dynamicPort());
|
||||
wireMock.start();
|
||||
}
|
||||
// Sometimes this is called twice, the second time resetting the config but not resetting the urls.
|
||||
if (wiremock && wireMock != null) {
|
||||
MapPaintUtils.setPaintStyleUrl(replaceUrl(wireMock, MapPaintUtils.getPaintStyleUrl()));
|
||||
// Avoid cases where tests could write the wiremock url to some fields.
|
||||
if (currentReleaseUrl == null) {
|
||||
|
@ -146,8 +149,6 @@ public class MapWithAITestRules extends JOSMTestRules {
|
|||
Logging.error(e);
|
||||
}
|
||||
wireMockUsers.add(this);
|
||||
} else if (wiremock) {
|
||||
wireMockUsers.add(this);
|
||||
}
|
||||
}
|
||||
if (sources) {
|
||||
|
|
Ładowanie…
Reference in New Issue