ARTEMIS-2246 Fixing testsuite

This commit is contained in:
Clebert Suconic 2019-02-08 18:41:20 -05:00
parent c41edf9bfd
commit 8edca409f6
2 changed files with 12 additions and 1 deletions

View File

@ -64,6 +64,16 @@ public class CleanupSystemPropertiesRule extends ExternalResource {
}
}
for (Map.Entry<Object, Object> entry : originalProperties.entrySet()) {
if (System.getProperty((String) entry.getKey()) == null) {
System.out.println("======================================================================================================");
System.out.println("Reinstating property " + entry.getKey() + "=" + entry.getValue());
System.setProperty((String) entry.getKey(), (String) entry.getValue());
System.out.println("======================================================================================================");
}
}
if (!newProperties.isEmpty() || !changed.isEmpty()) {
System.out.println("======================================================================================================");
@ -91,7 +101,6 @@ public class CleanupSystemPropertiesRule extends ExternalResource {
System.out.println("======================================================================================================");
}
// lets give GC a hand
originalProperties.clear();
originalProperties = null;

View File

@ -707,6 +707,8 @@ public class FileConfigurationTest extends ConfigurationImplTest {
@Override
protected Configuration createConfiguration() throws Exception {
// This may be set for the entire testsuite, but on this test we need this out
System.clearProperty("brokerconfig.maxDiskUsage");
FileConfiguration fc = new FileConfiguration();
FileDeploymentManager deploymentManager = new FileDeploymentManager(getConfigurationName());
deploymentManager.addDeployable(fc);