summaryrefslogtreecommitdiff
path: root/qpid/java/systests/src
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2012-07-05 09:40:06 +0000
committerKeith Wall <kwall@apache.org>2012-07-05 09:40:06 +0000
commit8b555d057f483874d9384c15bd989c975d18e0b0 (patch)
treeb5fdf00f4a10c465da038df03d6cdeb357501881 /qpid/java/systests/src
parent179f46270e539569e7c57e763ccd8a49ccf09a84 (diff)
downloadqpid-python-8b555d057f483874d9384c15bd989c975d18e0b0.tar.gz
QPID-4109: Re-enable LoggingManagement MBean
* Re-wire up LoggingManagementMBean. * Centralise log4j specific functionality into LoggingFacade class (moving implementation from LoggingManagementMBean and QpidLog4JConfigurator together). * Implement unit-tests for MBean and Facade levels. Reenforce units tests with system tests testing logging management end to end. * Changed QpidBrokerTestCase so that log4j.configuration is _always_ used to obtain the log4j config file regardless of whether test type is spawned or internal (previously log4j.configuration was respected only for internal tests). This was require to be able to write a logging management system test that could safely change the contents of the log4j config without running the risk of effecting other tests. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1357528 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/systests/src')
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
index 056356cad7..aa909a6674 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
@@ -89,6 +89,7 @@ public class QpidBrokerTestCase extends QpidTestCase
protected final static String QpidHome = System.getProperty("QPID_HOME");
protected File _configFile = new File(System.getProperty("broker.config"));
+ protected File _logConfigFile = new File(System.getProperty("log4j.configuration"));
protected static final Logger _logger = Logger.getLogger(QpidBrokerTestCase.class);
protected static final int LOGMONITOR_TIMEOUT = 5000;
@@ -364,6 +365,7 @@ public class QpidBrokerTestCase extends QpidTestCase
.replace("@SSL_PORT", "" + sslPort)
.replace("@MPORT", "" + getManagementPort(port))
.replace("@CONFIG_FILE", _configFile.toString())
+ .replace("@LOG_CONFIG_FILE", _logConfigFile.toString())
.replace("@EXCLUDES", protocolExcludesList)
.replace("@INCLUDES", protocolIncludesList);
}
@@ -413,7 +415,7 @@ public class QpidBrokerTestCase extends QpidTestCase
//Set the log config file, relying on the log4j.configuration system property
//set on the JVM by the JUnit runner task in module.xml.
- options.setLogConfigFile(new URL(System.getProperty("log4j.configuration")).getFile());
+ options.setLogConfigFile(_logConfigFile.getAbsolutePath());
Broker broker = new Broker();
_logger.info("starting internal broker (same JVM)");