Commit 5c708ae7 authored by Andy Wilkinson's avatar Andy Wilkinson

Merge branch '1.4.x' into 1.5.x

parents c22230a4 5b4f9edc
...@@ -61,8 +61,11 @@ public class PropertiesLauncherTests { ...@@ -61,8 +61,11 @@ public class PropertiesLauncherTests {
@Rule @Rule
public TemporaryFolder temporaryFolder = new TemporaryFolder(); public TemporaryFolder temporaryFolder = new TemporaryFolder();
private ClassLoader contextClassLoader;
@Before @Before
public void setup() throws IOException { public void setup() throws IOException {
this.contextClassLoader = Thread.currentThread().getContextClassLoader();
MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this);
System.setProperty("loader.home", System.setProperty("loader.home",
new File("src/test/resources").getAbsolutePath()); new File("src/test/resources").getAbsolutePath());
...@@ -70,6 +73,7 @@ public class PropertiesLauncherTests { ...@@ -70,6 +73,7 @@ public class PropertiesLauncherTests {
@After @After
public void close() { public void close() {
Thread.currentThread().setContextClassLoader(this.contextClassLoader);
System.clearProperty("loader.home"); System.clearProperty("loader.home");
System.clearProperty("loader.path"); System.clearProperty("loader.path");
System.clearProperty("loader.main"); System.clearProperty("loader.main");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment