You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2019/02/08 23:42:19 UTC
[activemq-artemis] branch master updated: ARTEMIS-2246 Fixing
testsuite
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push:
new 8edca40 ARTEMIS-2246 Fixing testsuite
8edca40 is described below
commit 8edca409f6d0e3fa1a509b4d376a11022e8712ff
Author: Clebert Suconic <cl...@apache.org>
AuthorDate: Fri Feb 8 18:41:20 2019 -0500
ARTEMIS-2246 Fixing testsuite
---
.../activemq/artemis/utils/CleanupSystemPropertiesRule.java | 11 ++++++++++-
.../artemis/core/config/impl/FileConfigurationTest.java | 2 ++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/CleanupSystemPropertiesRule.java b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/CleanupSystemPropertiesRule.java
index 3dfddd1..e245d49 100644
--- a/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/CleanupSystemPropertiesRule.java
+++ b/artemis-commons/src/test/java/org/apache/activemq/artemis/utils/CleanupSystemPropertiesRule.java
@@ -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;
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
index 85d0ddf..79ea2d4 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
@@ -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);