logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: Jenkins build is unstable: Log4j 2.x #2019
Date Sun, 12 Jun 2016 05:22:47 GMT
Yes. It creates the file and writes to it. The test should then end and run again. On the second
run the file should roll over. The files should both have the header, footer, and same number
of lines so they should be the same size.

Ralph

> On Jun 11, 2016, at 10:08 PM, Remko Popma <remko.popma@gmail.com> wrote:
> 
> Hm... this is the second time I see this test fail:
> Stacktrace
> 
> java.lang.AssertionError
> 	at org.apache.logging.log4j.core.appender.rolling.RollingAppenderOnStartupTest.afterClass(RollingAppenderOnStartupTest.java:85)
> 
> What does this test do? It looks like it remembers the size of the first non-empty file
in the directory, and then asserts that all other files are the same size, is that correct?

> 
> @AfterClass
> public static void afterClass() throws Exception {
>     long size = 0;
>     try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(Paths.get("target/onStartup")))
{
>         for (Path path : directoryStream) {
>             if (size == 0) {
>                 size = Files.size(path);
>             } else {
>                 assertTrue(size == Files.size(path)); // <- line 85 
>             }
>             Files.delete(path);
>         }
>         Files.delete(Paths.get("target/onStartup"));
>     }
> }
> 
> 
> 
> 
> 
> 
> 
> 
> 
>> On Sun, Jun 12, 2016 at 1:17 PM, Apache Jenkins Server <jenkins@builds.apache.org>
wrote:
>> See <https://builds.apache.org/job/Log4j%202.x/2019/changes>
>> 
>> 
>> ---------------------------------------------------------------------
>> 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