qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1335972 - in /qpid/trunk/qpid/java: systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java test-profiles/log4j-test.xml
Date Wed, 09 May 2012 08:13:51 GMT
Author: rgodfrey
Date: Wed May  9 08:13:50 2012
New Revision: 1335972

URL: http://svn.apache.org/viewvc?rev=1335972&view=rev
Log:
QPID-3988 : Fix spurious test errors caused by change in log4j ConsoleAppender behaviour between
1.2.12 and later versions

Modified:
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
    qpid/trunk/qpid/java/test-profiles/log4j-test.xml

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java?rev=1335972&r1=1335971&r2=1335972&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
(original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
Wed May  9 08:13:50 2012
@@ -17,11 +17,39 @@
  */
 package org.apache.qpid.test.utils;
 
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+import javax.jms.BytesMessage;
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.MapMessage;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.ObjectMessage;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.StreamMessage;
+import javax.jms.TextMessage;
+import javax.jms.Topic;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.configuration.XMLConfiguration;
 import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
-
 import org.apache.qpid.AMQException;
 import org.apache.qpid.client.AMQConnectionFactory;
 import org.apache.qpid.client.AMQQueue;
@@ -41,37 +69,6 @@ import org.apache.qpid.url.URLSyntaxExce
 import org.apache.qpid.util.FileUtils;
 import org.apache.qpid.util.LogMonitor;
 
-import javax.jms.BytesMessage;
-import javax.jms.Connection;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.MapMessage;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.StreamMessage;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
 /**
  * Qpid base class for system testing test cases.
  */
@@ -219,10 +216,6 @@ public class QpidBrokerTestCase extends 
             out = new PrintStream(new FileOutputStream(_outputFile), true);
             err = new PrintStream(String.format("%s/TEST-%s.err", _output, qname));
 
-            // This is relying on behaviour specific to log4j 1.2.12.   If we were to upgrade
to 1.2.13 or
-            // beyond we must change either code (or config) to ensure that ConsoleAppender#setFollow
-            // is set to true otherwise log4j logging will not respect the following reassignment.
-
             System.setOut(out);
             System.setErr(err);
 

Modified: qpid/trunk/qpid/java/test-profiles/log4j-test.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/test-profiles/log4j-test.xml?rev=1335972&r1=1335971&r2=1335972&view=diff
==============================================================================
--- qpid/trunk/qpid/java/test-profiles/log4j-test.xml (original)
+++ qpid/trunk/qpid/java/test-profiles/log4j-test.xml Wed May  9 08:13:50 2012
@@ -30,6 +30,7 @@
   <appender name="console" class="org.apache.log4j.ConsoleAppender">
     <param name="Target" value="System.out"/>
     <param name="ImmediateFlush" value="true"/>
+    <param name="Follow" value="true"/>
     <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%t %d %p [%c{4}] %m%n"/>
     </layout>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message