activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [activemq-artemis] 02/03: ARTEMIS-2246 Setting the max-disk-usage as 100 on the testsuite
Date Thu, 07 Feb 2019 20:20:00 GMT
This is an automated email from the ASF dual-hosted git repository.

jbertram pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git

commit d2df7b7e85ac2016361c2d83a3930c5e6d4c9b85
Author: Clebert Suconic <clebertsuconic@apache.org>
AuthorDate: Thu Feb 7 15:07:47 2019 -0500

    ARTEMIS-2246 Setting the max-disk-usage as 100 on the testsuite
    
    This is to avoid issues with CI and Dev Machiens, while still preserving
    a sensible default for production systems.
---
 .../api/config/ActiveMQDefaultConfiguration.java     | 20 ++++++++++++++++++--
 pom.xml                                              |  2 +-
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
index c6bc32f..61f0f5d 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
@@ -23,12 +23,16 @@ import org.apache.activemq.artemis.api.core.RoutingType;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.server.ComponentConfigurationRoutingType;
 import org.apache.activemq.artemis.utils.critical.CriticalAnalyzerPolicy;
+import org.jboss.logging.Logger;
 
 /**
  * Default values of ActiveMQ Artemis configuration parameters.
  */
 public final class ActiveMQDefaultConfiguration {
-      /*
+
+   private static final Logger logger = Logger.getLogger(ActiveMQDefaultConfiguration.class);
+
+   /*
     * <p> In order to avoid compile time in-lining of constants, all access is done
through methods
     * and all fields are PRIVATE STATIC but not FINAL. This is done following the recommendation
at
     * <a href="http://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.4.9">13.4.9.
@@ -467,7 +471,19 @@ public final class ActiveMQDefaultConfiguration {
 
    public static final long DEFAULT_GLOBAL_MAX_SIZE = Runtime.getRuntime().maxMemory() /
2;
 
-   public static final int DEFAULT_MAX_DISK_USAGE = 90;
+   public static final int DEFAULT_MAX_DISK_USAGE;
+
+   static {
+      int maxDisk;
+      try {
+         maxDisk = Integer.parseInt(System.getProperty(ActiveMQDefaultConfiguration.getDefaultSystemPropertyPrefix()
+ "maxDiskUsage", "90"));
+      } catch (Throwable e) {
+         // This is not really supposed to happen, so just logging it, just in case
+         logger.warn(e);
+         maxDisk = 90;
+      }
+      DEFAULT_MAX_DISK_USAGE = maxDisk;
+   }
 
    public static final int DEFAULT_DISK_SCAN = 5000;
 
diff --git a/pom.xml b/pom.xml
index 3b82a86..d57cbea 100644
--- a/pom.xml
+++ b/pom.xml
@@ -166,7 +166,7 @@
 
       -->
 
-      <activemq-surefire-argline>-Djava.util.logging.manager=org.jboss.logmanager.LogManager
+      <activemq-surefire-argline>-Dbrokerconfig.maxDiskUsage=100 -Djava.util.logging.manager=org.jboss.logmanager.LogManager
          -Dlogging.configuration="file:${activemq.basedir}/tests/config/logging.properties"
          -Djava.library.path="${activemq.basedir}/artemis-native/bin" -Djgroups.bind_addr=localhost
-Dorg.apache.activemq.artemis.api.core.UDPBroadcastEndpointFactory.localBindAddress=localhost
          -Djava.net.preferIPv4Stack=true -Dbasedir=${basedir}


Mime
View raw message