qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ritch...@apache.org
Subject svn commit: r820315 - in /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid: server/BrokerStartupTest.java test/utils/QpidTestCase.java
Date Wed, 30 Sep 2009 15:54:13 GMT
Author: ritchiem
Date: Wed Sep 30 15:54:13 2009
New Revision: 820315

URL: http://svn.apache.org/viewvc?rev=820315&view=rev
Log:
Update QTC to allow the setting of debug logging for the external broker process. Update BrokerStartupTest
to ensure that these values are set to the default info as the test looks for the existence
of DEBUG messages as a sign of failure.

Modified:
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/BrokerStartupTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/BrokerStartupTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/BrokerStartupTest.java?rev=820315&r1=820314&r2=820315&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/BrokerStartupTest.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/BrokerStartupTest.java
Wed Sep 30 15:54:13 2009
@@ -88,6 +88,13 @@
             Logger.getLogger("qpid.protocol").setLevel(Level.WARN);
             Logger.getLogger("org.apache.qpid").setLevel(Level.WARN);
 
+            // Set the broker to use info level logging, which is the qpid-server
+            // default. Rather than debug which is the test default.
+            setSystemProperty("amqj.server.logging.level","info");
+            // Set the logging defaults to info for this test.
+            setSystemProperty("amqj.logging.level","info");
+            setSystemProperty("root.logging.level","info");
+
             startBroker();
 
             assertEquals("Log4j could not load desired configruation.",

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java?rev=820315&r1=820314&r2=820315&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java
Wed Sep 30 15:54:13 2009
@@ -467,6 +467,15 @@
             env.put("QPID_PNAME", "-DPNAME=QPBRKR -DTNAME=\"" + _testName + "\"");
             env.put("QPID_WORK", System.getProperty("QPID_WORK"));
 
+
+            // Use the environment variable to set amqj.logging.level for the broker
+            // The value used is a 'server' value in the test configuration to
+            // allow a differentiation between the client and broker logging levels.    
       
+            if (System.getProperty("amqj.server.logging.level") != null)
+            {
+                setBrokerEnvironment("AMQJ_LOGGING_LEVEL", System.getProperty("amqj.server.logging.level"));
+            }
+            
             // Add all the environment settings the test requested
             if (!_env.isEmpty())
             {
@@ -476,6 +485,18 @@
                 }
             }
 
+
+            // Add default test logging levels that are used by the log4j-test
+            if (System.getProperty("amqj.protocol.logging.level") != null)
+            {
+                setSystemProperty("amqj.protocol.logging.level", System.getProperty("amqj.protocol.logging.level"));
+            }
+            if (System.getProperty("root.logging.level") != null)
+            {
+                setSystemProperty("root.logging.level", System.getProperty("root.logging.level"));
+            }
+
+
             String QPID_OPTS = " ";
             // Add all the specified system properties to QPID_OPTS
             if (!_setProperties.isEmpty())



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message