"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/RollingAppenderDirectWriteWithReconfigureTest.java" between
apache-log4j-2.11.1-src.tar.gz and apache-log4j-2.11.2-src.tar.gz

About: Apache Log4j 2 is a logging library for Java. Source distribution (Java).

RollingAppenderDirectWriteWithReconfigureTest.java  (apache-log4j-2.11.1-src):RollingAppenderDirectWriteWithReconfigureTest.java  (apache-log4j-2.11.2-src)
skipping to change at line 60 skipping to change at line 60
public void setUp() throws Exception { public void setUp() throws Exception {
this.logger = loggerContextRule.getLogger(RollingAppenderDirectWriteWith ReconfigureTest.class.getName()); this.logger = loggerContextRule.getLogger(RollingAppenderDirectWriteWith ReconfigureTest.class.getName());
} }
@Test @Test
public void testRollingFileAppenderWithReconfigure() throws Exception { public void testRollingFileAppenderWithReconfigure() throws Exception {
logger.debug("Before reconfigure"); logger.debug("Before reconfigure");
@SuppressWarnings("resource") // managed by the rule. @SuppressWarnings("resource") // managed by the rule.
final LoggerContext context = loggerContextRule.getLoggerContext(); final LoggerContext context = loggerContextRule.getLoggerContext();
Configuration config = context.getConfiguration(); final Configuration config = context.getConfiguration();
context.setConfigLocation(new URI(CONFIG)); context.setConfigLocation(new URI(CONFIG));
context.reconfigure(); context.reconfigure();
logger.debug("Force a rollover"); logger.debug("Force a rollover");
final File dir = new File(DIR); final File dir = new File(DIR);
for (int i = 0; i < MAX_TRIES; ++i) { for (int i = 0; i < MAX_TRIES; ++i) {
Thread.sleep(200); Thread.sleep(200);
if (config != context.getConfiguration()) { if (config != context.getConfiguration()) {
break; break;
} }
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)