diff --git a/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlConfigurationTest.java b/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlConfigurationTest.java index 51b3d51cf5b..463bf0059a1 100644 --- a/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlConfigurationTest.java +++ b/jetty-xml/src/test/java/org/eclipse/jetty/xml/XmlConfigurationTest.java @@ -1622,15 +1622,23 @@ public class XmlConfigurationTest " " + ""); - configuration.setJettyStandardIdsAndProperties(null, Resource.newResource(war)); - configuration.getProperties().put("jetty.base", "/var/lib/jetty-base"); - if (configValue != null) - configuration.getProperties().put("jetty.sslContext.keyStorePath", configValue); + try + { + configuration.setJettyStandardIdsAndProperties(null, Resource.newResource(war)); + configuration.getProperties().put("jetty.base", "/var/lib/jetty-base"); + if (configValue != null) + configuration.getProperties().put("jetty.sslContext.keyStorePath", configValue); - TestConfiguration tc = new TestConfiguration(); - configuration.configure(tc); + TestConfiguration tc = new TestConfiguration(); + configuration.configure(tc); - assertThat(tc.getTestString(), is(expectedPath)); + assertThat(tc.getTestString(), is(expectedPath)); + } + finally + { + // cleanup after myself + configuration.getProperties().remove("jetty.base"); + } } @Test @@ -1658,7 +1666,7 @@ public class XmlConfigurationTest FS.ensureDeleted(testPath); Path baseDir = testPath.resolve("bogus"); String resolved = XmlConfiguration.resolvePath(baseDir.toString(), "etc/keystore"); - assertNull(resolved, "Should be null as baseDir does not exist"); + assertEquals(baseDir.resolve("etc/keystore").toString(), resolved); } private ByteArrayOutputStream captureLoggingBytes(ThrowableAction action) throws Exception