NO-JIRA Removing verbose log.info from testsuite
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/753a8d26 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/753a8d26 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/753a8d26 Branch: refs/heads/master Commit: 753a8d2635160321e81f44eff8b0ab5e0bd5fb10 Parents: cbe3621 Author: Clebert Suconic <[email protected]> Authored: Thu Apr 6 16:29:55 2017 -0400 Committer: Justin Bertram <[email protected]> Committed: Thu Apr 6 19:55:09 2017 -0500 ---------------------------------------------------------------------- .../artemis/core/config/impl/ConfigurationImpl.java | 8 +++++++- .../activemq/artemis/core/server/impl/QueueImpl.java | 13 ++++++++----- .../activemq/artemis/tests/util/ActiveMQTestBase.java | 4 ++++ 3 files changed, 19 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/753a8d26/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java index f230fb5..f3455d0 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java @@ -74,6 +74,10 @@ public class ConfigurationImpl implements Configuration, Serializable { private static final Logger logger = Logger.getLogger(ConfigurationImpl.class); + // We want to turn of a few log.infos from the testsuite as they would be too verbose for tests + // Only the testsuite should set this one up + public static boolean TEST_MODE = false; + public static final JournalType DEFAULT_JOURNAL_TYPE = JournalType.ASYNCIO; private static final long serialVersionUID = 4077088945050267843L; @@ -353,7 +357,9 @@ public class ConfigurationImpl implements Configuration, Serializable { public long getGlobalMaxSize() { if (globalMaxSize == null) { this.globalMaxSize = ActiveMQDefaultConfiguration.getDefaultMaxGlobalSize(); - ActiveMQServerLogger.LOGGER.usingDefaultPaging(globalMaxSize); + if (!TEST_MODE) { + ActiveMQServerLogger.LOGGER.usingDefaultPaging(globalMaxSize); + } } return globalMaxSize; } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/753a8d26/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java index 406ba5d..3901a84 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java @@ -47,6 +47,7 @@ import org.apache.activemq.artemis.api.core.Pair; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.api.core.management.CoreNotificationType; import org.apache.activemq.artemis.api.core.management.ManagementHelper; +import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl; import org.apache.activemq.artemis.core.filter.Filter; import org.apache.activemq.artemis.core.io.IOCallback; import org.apache.activemq.artemis.core.paging.cursor.PagePosition; @@ -3121,11 +3122,13 @@ public class QueueImpl implements Queue { } private void checkDeadLetterAddressAndExpiryAddress(final AddressSettings settings) { - if (settings.getDeadLetterAddress() == null) { - ActiveMQServerLogger.LOGGER.AddressSettingsNoDLA(name); - } - if (settings.getExpiryAddress() == null) { - ActiveMQServerLogger.LOGGER.AddressSettingsNoExpiryAddress(name); + if (!ConfigurationImpl.TEST_MODE) { + if (settings.getDeadLetterAddress() == null) { + ActiveMQServerLogger.LOGGER.AddressSettingsNoDLA(name); + } + if (settings.getExpiryAddress() == null) { + ActiveMQServerLogger.LOGGER.AddressSettingsNoExpiryAddress(name); + } } } http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/753a8d26/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java ---------------------------------------------------------------------- diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java index 5502653..0ffb386 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java @@ -157,6 +157,10 @@ import org.junit.runner.Description; */ public abstract class ActiveMQTestBase extends Assert { + static { + ConfigurationImpl.TEST_MODE = true; + } + private static final Logger logger = Logger.getLogger(ActiveMQTestBase.class); @Rule
