NO-JIRA Removing verbose log.info from testsuite

This commit is contained in:
Clebert Suconic 2017-04-06 16:29:55 -04:00 committed by Justin Bertram
parent cbe3621431
commit 753a8d2635
3 changed files with 19 additions and 6 deletions

View File

@ -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;
}

View File

@ -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);
}
}
}

View File

@ -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