Use CoreLoggerContexts.stopLoggerContext in 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/844187e8
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/844187e8
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/844187e8

Branch: refs/heads/LOG4J2-1161
Commit: 844187e838b510ff11522c19e86d413f996d47ad
Parents: aad6734
Author: Matt Sicker <boa...@gmail.com>
Authored: Wed Oct 21 01:35:07 2015 -0500
Committer: Matt Sicker <boa...@gmail.com>
Committed: Wed Oct 21 01:35:07 2015 -0500

----------------------------------------------------------------------
 .../core/appender/MemoryMappedFileAppenderLocationTest.java      | 4 ++--
 .../log4j/core/appender/MemoryMappedFileAppenderRemapTest.java   | 4 ++--
 .../log4j/core/appender/MemoryMappedFileAppenderSimpleTest.java  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/844187e8/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderLocationTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderLocationTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderLocationTest.java
index 54c2cee..f767c5e 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderLocationTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderLocationTest.java
@@ -22,7 +22,7 @@ import java.io.FileReader;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.CoreLoggerContexts;
 import org.apache.logging.log4j.core.config.ConfigurationFactory;
 import org.apache.logging.log4j.core.util.Integers;
 import org.junit.Before;
@@ -69,7 +69,7 @@ public class MemoryMappedFileAppenderLocationTest {
             log.warn("Test log2");
             assertEquals("not grown", expectedFileLength, f.length());
         } finally {
-            (LoggerContext.getContext(false)).stop();
+            CoreLoggerContexts.stopLoggerContext(false);
         }
         final int LINESEP = System.getProperty("line.separator").length();
         assertEquals("Shrunk to actual used size", 474 + 2 * LINESEP, 
f.length());

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/844187e8/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderRemapTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderRemapTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderRemapTest.java
index 87e4d35..54f5103 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderRemapTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderRemapTest.java
@@ -23,7 +23,7 @@ import java.util.Arrays;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.CoreLoggerContexts;
 import org.apache.logging.log4j.core.config.ConfigurationFactory;
 import org.junit.Before;
 import org.junit.Test;
@@ -69,7 +69,7 @@ public class MemoryMappedFileAppenderRemapTest {
             log.warn(new String(text));
             assertEquals("grown again", 256 * 3, f.length());
         } finally {
-            (LoggerContext.getContext(false)).stop();
+            CoreLoggerContexts.stopLoggerContext(false);
         }
         final int LINESEP = System.getProperty("line.separator").length();
         assertEquals("Shrunk to actual used size", 658 + 3 * LINESEP, 
f.length());

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/844187e8/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderSimpleTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderSimpleTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderSimpleTest.java
index ccdd9d2..9d310c9 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderSimpleTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderSimpleTest.java
@@ -22,7 +22,7 @@ import java.io.FileReader;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.CoreLoggerContexts;
 import org.apache.logging.log4j.core.config.ConfigurationFactory;
 import org.junit.Before;
 import org.junit.Test;
@@ -64,7 +64,7 @@ public class MemoryMappedFileAppenderSimpleTest {
             log.warn("Test log2");
             assertEquals("not grown", 
MemoryMappedFileManager.DEFAULT_REGION_LENGTH, f.length());
         } finally {
-            (LoggerContext.getContext(false)).stop();
+            CoreLoggerContexts.stopLoggerContext(false);
         }
         final int LINESEP = System.getProperty("line.separator").length();
         assertEquals("Shrunk to actual used size", 186 + 2 * LINESEP, 
f.length());

Reply via email to