logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject svn commit: r569047 - /logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/XMLLayoutTest.java
Date Thu, 23 Aug 2007 15:33:47 GMT
Author: carnold
Date: Thu Aug 23 08:33:47 2007
New Revision: 569047

URL: http://svn.apache.org/viewvc?rev=569047&view=rev
Log:
Bug 37560: Clear NDC and MDC before and after XMLLayoutTest tests

Modified:
    logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/XMLLayoutTest.java

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/XMLLayoutTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/XMLLayoutTest.java?rev=569047&r1=569046&r2=569047&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/XMLLayoutTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/xml/XMLLayoutTest.java Thu Aug 23
08:33:47 2007
@@ -55,6 +55,23 @@
     super(testName, "text/plain", false, null, null);
   }
 
+    /**
+     * Clear MDC and NDC before test.
+     */
+  public void setUp() {
+      NDC.clear();
+      if (MDC.getContext() != null) {
+        MDC.getContext().clear();
+      }
+  }
+
+    /**
+     * Clear MDC and NDC after test.
+     */
+  public void tearDown() {
+      setUp();
+  }
+
   /**
    * @{inheritDoc}
    */



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message