Author: ggregory
Date: Thu May  8 17:53:31 2014
New Revision: 1593350

URL: http://svn.apache.org/r1593350
Log:
ThreadContext.clearAll() must be used from tests to avoid creating test 
failures due to test ordering.

Modified:
    
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java

Modified: 
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java?rev=1593350&r1=1593349&r2=1593350&view=diff
==============================================================================
--- 
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java
 (original)
+++ 
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/RFC5424LayoutTest.java
 Thu May  8 17:53:31 2014
@@ -61,6 +61,7 @@ public class RFC5424LayoutTest {
 
     @BeforeClass
     public static void setupClass() {
+        ThreadContext.clearAll();
         StatusLogger.getLogger().setLevel(Level.OFF);
         ConfigurationFactory.setConfigurationFactory(cf);
         final LoggerContext ctx = (LoggerContext) LogManager.getContext();
@@ -70,6 +71,7 @@ public class RFC5424LayoutTest {
     @AfterClass
     public static void cleanupClass() {
         ConfigurationFactory.removeConfigurationFactory(cf);
+        ThreadContext.clearAll();
     }
 
     /**


Reply via email to