Repository: logging-log4j2
Updated Branches:
  refs/heads/master 94072a1ec -> 9152a8201


Better method name in JUnit rule.

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

Branch: refs/heads/master
Commit: 9152a8201a47b4ac2f16488d2f25a0ee895ac8e5
Parents: 94072a1
Author: Gary Gregory <ggreg...@apache.org>
Authored: Sun Aug 28 14:04:44 2016 -0700
Committer: Gary Gregory <ggreg...@apache.org>
Committed: Sun Aug 28 14:04:44 2016 -0700

----------------------------------------------------------------------
 .../apache/logging/log4j/core/DeadlockTest.java |  2 +-
 .../logging/log4j/core/LoggerUpdateTest.java    |  2 +-
 .../appender/JsonCompleteFileAppenderTest.java  |  2 +-
 .../appender/RandomAccessFileAppenderTests.java |  2 +-
 .../RollingAppenderCronOnceADayTest.java        |  2 +-
 .../rolling/RollingAppenderCronTest.java        |  2 +-
 .../routing/PropertiesRoutingAppenderTest.java  |  2 +-
 .../appender/routing/RoutingAppenderTest.java   |  2 +-
 .../routing/RoutingAppenderWithPurgingTest.java |  2 +-
 .../routing/RoutingDefaultAppenderTest.java     |  2 +-
 .../log4j/core/config/ConfigurationTest.java    |  2 +-
 .../core/config/CustomConfigurationTest.java    |  2 +-
 .../core/config/MissingRootLoggerTest.java      |  2 +-
 .../logging/log4j/core/config/XIncludeTest.java |  2 +-
 .../core/util/ShutdownCallbackRegistryTest.java |  2 +-
 .../logging/log4j/junit/LoggerContextRule.java  | 22 ++++++++++----------
 16 files changed, 26 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/DeadlockTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/DeadlockTest.java 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/DeadlockTest.java
index b754636..c3cc5b4 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/DeadlockTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/DeadlockTest.java
@@ -32,6 +32,6 @@ public class DeadlockTest {
 
     @Test
     public void deadlockOnReconfigure() {
-        context.getContext().reconfigure();
+        context.getLoggerContext().reconfigure();
     }
 }

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerUpdateTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerUpdateTest.java 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerUpdateTest.java
index 574236c..572e392 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerUpdateTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/LoggerUpdateTest.java
@@ -69,7 +69,7 @@ public class LoggerUpdateTest {
 
     @Test
     public void testUpdateLoggersPropertyListeners() throws Exception {
-        final LoggerContext ctx = context.getContext();
+        final LoggerContext ctx = context.getLoggerContext();
         ctx.addPropertyChangeListener(new PropertyChangeListener() {
             @Override
             public void propertyChange(final PropertyChangeEvent evt) {

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/JsonCompleteFileAppenderTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/JsonCompleteFileAppenderTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/JsonCompleteFileAppenderTest.java
index 47cb060..aad7d27 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/JsonCompleteFileAppenderTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/JsonCompleteFileAppenderTest.java
@@ -65,7 +65,7 @@ public class JsonCompleteFileAppenderTest {
         final String logMsg = "Message flushed with immediate flush=true";
         logger.info(logMsg);
         logger.error(logMsg, new IllegalArgumentException("badarg"));
-        this.loggerContextRule.getContext().stop(); // stops async thread
+        this.loggerContextRule.getLoggerContext().stop(); // stops async thread
         String line1;
         String line2;
         String line3;

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppenderTests.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppenderTests.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppenderTests.java
index 7f6f03d..3044c44 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppenderTests.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppenderTests.java
@@ -77,7 +77,7 @@ public class RandomAccessFileAppenderTests {
         final Logger logger = this.init.getLogger("com.foo.Bar");
         final String message = "This is a test log message brought to you by 
Slurm.";
         logger.info(message);
-        this.init.getContext().stop(); // stop async thread
+        this.init.getLoggerContext().stop(); // stop async thread
 
         String line;
         try (final BufferedReader reader = new BufferedReader(new 
FileReader(this.logFile))) {

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronOnceADayTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronOnceADayTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronOnceADayTest.java
index b6ee09d..f995990 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronOnceADayTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronOnceADayTest.java
@@ -88,7 +88,7 @@ public class RollingAppenderCronOnceADayTest {
         assertTrue("Log file does not exist", file.exists());
         logger.debug("This is test message number 1, waiting for rolling");
 
-        final RollingFileAppender app = (RollingFileAppender) 
loggerContextRule.getContext().getConfiguration().getAppender("RollingFile");
+        final RollingFileAppender app = (RollingFileAppender) 
loggerContextRule.getLoggerContext().getConfiguration().getAppender("RollingFile");
         final TriggeringPolicy policy = app.getManager().getTriggeringPolicy();
         assertNotNull("No triggering policy", policy);
         assertTrue("Incorrect policy type", policy instanceof 
CronTriggeringPolicy);

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronTest.java
index d04de19..6c2ab9a 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderCronTest.java
@@ -94,7 +94,7 @@ public class RollingAppenderCronTest {
             logger.debug("Adding new event {}", i);
         }
         Thread.sleep(1000);
-        final RollingFileAppender app = (RollingFileAppender) 
loggerContextRule.getContext().getConfiguration().getAppender("RollingFile");
+        final RollingFileAppender app = (RollingFileAppender) 
loggerContextRule.getLoggerContext().getConfiguration().getAppender("RollingFile");
         final TriggeringPolicy policy = app.getManager().getTriggeringPolicy();
         assertNotNull("No triggering policy", policy);
         assertTrue("Incorrect policy type", policy instanceof 
CronTriggeringPolicy);

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/PropertiesRoutingAppenderTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/PropertiesRoutingAppenderTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/PropertiesRoutingAppenderTest.java
index 2fa5cd3..ac0c152 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/PropertiesRoutingAppenderTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/PropertiesRoutingAppenderTest.java
@@ -57,7 +57,7 @@ public class PropertiesRoutingAppenderTest {
     @After
     public void tearDown() throws Exception {
         this.app.clear();
-        this.loggerContextRule.getContext().stop();
+        this.loggerContextRule.getLoggerContext().stop();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingAppenderTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingAppenderTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingAppenderTest.java
index 3df13c6..cd28c21 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingAppenderTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingAppenderTest.java
@@ -56,7 +56,7 @@ public class RoutingAppenderTest {
     @After
     public void tearDown() throws Exception {
         this.app.clear();
-        this.loggerContextRule.getContext().stop();
+        this.loggerContextRule.getLoggerContext().stop();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingAppenderWithPurgingTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingAppenderWithPurgingTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingAppenderWithPurgingTest.java
index db1f26b..8fdb402 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingAppenderWithPurgingTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingAppenderWithPurgingTest.java
@@ -71,7 +71,7 @@ public class RoutingAppenderWithPurgingTest {
     @After
     public void tearDown() throws Exception {
         this.app.clear();
-        this.loggerContextRule.getContext().stop();
+        this.loggerContextRule.getLoggerContext().stop();
     }
 
     @Test(timeout = 5000)

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingDefaultAppenderTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingDefaultAppenderTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingDefaultAppenderTest.java
index b003a84..caf2cde 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingDefaultAppenderTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/routing/RoutingDefaultAppenderTest.java
@@ -56,7 +56,7 @@ public class RoutingDefaultAppenderTest {
         if (app != null) {
             app.clear();
         }
-        this.loggerContextRule.getContext().stop();
+        this.loggerContextRule.getLoggerContext().stop();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/config/ConfigurationTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/ConfigurationTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/ConfigurationTest.java
index 0c7c569..a9b48e7 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/ConfigurationTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/ConfigurationTest.java
@@ -89,7 +89,7 @@ public class ConfigurationTest {
 
     @Before
     public void setUp() throws Exception {
-        this.ctx = this.init.getContext();
+        this.ctx = this.init.getLoggerContext();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/config/CustomConfigurationTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/CustomConfigurationTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/CustomConfigurationTest.java
index 6c7b5f0..ab31fe0 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/CustomConfigurationTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/CustomConfigurationTest.java
@@ -66,7 +66,7 @@ public class CustomConfigurationTest {
     @Test
     public void testConfig() {
         // don't bother using "error" since that's the default; try another 
level
-        final LoggerContext ctx = this.init.getContext();
+        final LoggerContext ctx = this.init.getLoggerContext();
         ctx.reconfigure();
         final Configuration config = ctx.getConfiguration();
         assertThat(config, instanceOf(XmlConfiguration.class));

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/config/MissingRootLoggerTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/MissingRootLoggerTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/MissingRootLoggerTest.java
index 60aa0d9..ba711dd 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/MissingRootLoggerTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/MissingRootLoggerTest.java
@@ -42,7 +42,7 @@ public class MissingRootLoggerTest {
 
     @Test
     public void testMissingRootLogger() throws Exception {
-        final LoggerContext ctx = context.getContext();
+        final LoggerContext ctx = context.getLoggerContext();
         final Logger logger = ctx.getLogger("sample.Logger1");
         assertTrue("Logger should have the INFO level enabled", 
logger.isInfoEnabled());
         assertFalse("Logger should have the DEBUG level disabled", 
logger.isDebugEnabled());

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/config/XIncludeTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/XIncludeTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/XIncludeTest.java
index 9027b1d..8847da1 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/config/XIncludeTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/config/XIncludeTest.java
@@ -89,7 +89,7 @@ public class XIncludeTest {
 
     @Before
     public void setUp() throws Exception {
-        this.ctx = this.init.getContext();
+        this.ctx = this.init.getLoggerContext();
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/core/util/ShutdownCallbackRegistryTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/util/ShutdownCallbackRegistryTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/util/ShutdownCallbackRegistryTest.java
index 505c272..433783e 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/util/ShutdownCallbackRegistryTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/util/ShutdownCallbackRegistryTest.java
@@ -47,7 +47,7 @@ public class ShutdownCallbackRegistryTest {
 
     @Test
     public void testShutdownCallbackRegistry() throws Exception {
-        final LoggerContext context = ctx.getContext();
+        final LoggerContext context = ctx.getLoggerContext();
         assertTrue("LoggerContext should be started", context.isStarted());
         assertThat(Registry.CALLBACKS, hasSize(1));
         Registry.shutdown();

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/9152a820/log4j-core/src/test/java/org/apache/logging/log4j/junit/LoggerContextRule.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/junit/LoggerContextRule.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/junit/LoggerContextRule.java
index c3aaef9..b3ec1e0 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/junit/LoggerContextRule.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/junit/LoggerContextRule.java
@@ -50,7 +50,7 @@ public class LoggerContextRule implements TestRule {
     private static final String SYS_PROP_KEY_CLASS_NAME = 
"org.apache.logging.log4j.junit.LoggerContextRule#ClassName";
     private static final String SYS_PROP_KEY_DISPLAY_NAME = 
"org.apache.logging.log4j.junit.LoggerContextRule#DisplayName";
     private final String configLocation;
-    private LoggerContext context;
+    private LoggerContext loggerContext;
     private Class<? extends ContextSelector> contextSelectorClass;
     private String testClassName;
     private long shutdownTimeout;
@@ -107,16 +107,16 @@ public class LoggerContextRule implements TestRule {
                 // LogManager.setFactory(new 
Log4jContextFactory(LoaderUtil.newInstanceOf(contextSelectorClass)));
                 System.setProperty(SYS_PROP_KEY_CLASS_NAME, 
description.getClassName());
                 System.setProperty(SYS_PROP_KEY_DISPLAY_NAME, 
description.getDisplayName());
-                context = Configurator.initialize(description.getDisplayName(),
+                loggerContext = 
Configurator.initialize(description.getDisplayName(),
                         description.getTestClass().getClassLoader(), 
configLocation);
                 try {
                     base.evaluate();
                 } finally {
-                    if (!Configurator.shutdown(context, shutdownTimeout, 
shutdownTimeUnit)) {
+                    if (!Configurator.shutdown(loggerContext, shutdownTimeout, 
shutdownTimeUnit)) {
                         StatusLogger.getLogger().error("Logger context {} did 
not shutdown completely after {} {}.",
-                                context.getName(), shutdownTimeout, 
shutdownTimeUnit);
+                                loggerContext.getName(), shutdownTimeout, 
shutdownTimeUnit);
                     }
-                    context = null;
+                    loggerContext = null;
                     contextSelectorClass = null;
                     StatusLogger.getLogger().reset();
                     System.clearProperty(Constants.LOG4J_CONTEXT_SELECTOR);
@@ -160,7 +160,7 @@ public class LoggerContextRule implements TestRule {
      * @return this LoggerContext's Configuration.
      */
     public Configuration getConfiguration() {
-        return context.getConfiguration();
+        return loggerContext.getConfiguration();
     }
 
     /**
@@ -168,8 +168,8 @@ public class LoggerContextRule implements TestRule {
      *
      * @return the current LoggerContext.
      */
-    public LoggerContext getContext() {
-        return context;
+    public LoggerContext getLoggerContext() {
+        return loggerContext;
     }
 
     /**
@@ -195,7 +195,7 @@ public class LoggerContextRule implements TestRule {
      * @return the test class's named Logger.
      */
     public Logger getLogger() {
-        return context.getLogger(testClassName);
+        return loggerContext.getLogger(testClassName);
     }
 
     /**
@@ -206,7 +206,7 @@ public class LoggerContextRule implements TestRule {
      * @return the named Logger.
      */
     public Logger getLogger(final String name) {
-        return context.getLogger(name);
+        return loggerContext.getLogger(name);
     }
 
     /**
@@ -249,7 +249,7 @@ public class LoggerContextRule implements TestRule {
      * @return the root logger.
      */
     public Logger getRootLogger() {
-        return context.getRootLogger();
+        return loggerContext.getRootLogger();
     }
 
     @Override

Reply via email to