Repository: logging-log4j2
Updated Branches:
  refs/heads/LOG4J2-1442 9caf597d1 -> 2959f19c8


LOG4J2-1442 fix failing unit tests


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/2959f19c
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/2959f19c
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/2959f19c

Branch: refs/heads/LOG4J2-1442
Commit: 2959f19c8843038181f5750bd82e07af93d33e94
Parents: 9caf597
Author: Mikael StÃ¥ldal <[email protected]>
Authored: Thu May 18 19:00:12 2017 +0200
Committer: Mikael StÃ¥ldal <[email protected]>
Committed: Thu May 18 19:00:12 2017 +0200

----------------------------------------------------------------------
 .../log4j/core/async/AbstractAsyncThreadContextTestBase.java   | 1 +
 .../logging/log4j/core/impl/NestedLoggingFromToStringTest.java | 6 ++++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/2959f19c/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AbstractAsyncThreadContextTestBase.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AbstractAsyncThreadContextTestBase.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AbstractAsyncThreadContextTestBase.java
index f6aa1d4..00cad14 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AbstractAsyncThreadContextTestBase.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/async/AbstractAsyncThreadContextTestBase.java
@@ -45,6 +45,7 @@ public abstract class AbstractAsyncThreadContextTestBase {
 
     @BeforeClass
     public static void beforeClass() {
+        System.setProperty("log4j2.is.webapp", "false");
         System.setProperty("AsyncLogger.RingBufferSize", "128"); // minimum 
ringbuffer size
         System.setProperty("AsyncLoggerConfig.RingBufferSize", "128"); // 
minimum ringbuffer size
     }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/2959f19c/log4j-core/src/test/java/org/apache/logging/log4j/core/impl/NestedLoggingFromToStringTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/impl/NestedLoggingFromToStringTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/impl/NestedLoggingFromToStringTest.java
index fbd9dce..c5c037c 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/impl/NestedLoggingFromToStringTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/impl/NestedLoggingFromToStringTest.java
@@ -23,6 +23,7 @@ import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.junit.LoggerContextRule;
 import org.apache.logging.log4j.test.appender.ListAppender;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -45,6 +46,11 @@ import static org.junit.Assert.*;
  */
 public class NestedLoggingFromToStringTest {
 
+    @BeforeClass
+    public static void beforeClass() {
+        System.setProperty("log4j2.is.webapp", "false");
+    }
+    
     @Rule
     public LoggerContextRule context = new 
LoggerContextRule("log4j-sync-to-list.xml");
     private ListAppender listAppender;

Reply via email to