Oh, but yes, if the first file is non-zero and the second file is zero then it should fail - and that would be a correct failure.
Ralph > On Jun 12, 2016, at 12:38 AM, Ralph Goers <ralph.go...@dslextreme.com> wrote: > > Both files write a header, 100 events and a footer. Neither should be zero > and both should be the same length. > > Ralph > >> On Jun 11, 2016, at 11:44 PM, Remko Popma <remko.po...@gmail.com >> <mailto:remko.po...@gmail.com>> wrote: >> >> If the first file on the stream is non-zero length, and the second file is >> zero length, then won't the test fail? >> >> On Sun, Jun 12, 2016 at 2:45 PM, Ralph Goers <ralph.go...@dslextreme.com >> <mailto:ralph.go...@dslextreme.com>> wrote: >> Looked at the test again. It had some bugs in it. >> >> Ralph >> >>> On Jun 11, 2016, at 10:22 PM, Ralph Goers <ralph.go...@dslextreme.com >>> <mailto:ralph.go...@dslextreme.com>> wrote: >>> >>> 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.po...@gmail.com >>> <mailto:remko.po...@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 >>>> <jenk...@builds.apache.org <mailto:jenk...@builds.apache.org>> wrote: >>>> See <https://builds.apache.org/job/Log4j%202.x/2019/changes >>>> <https://builds.apache.org/job/Log4j%202.x/2019/changes>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org >>>> <mailto:log4j-dev-unsubscr...@logging.apache.org> >>>> For additional commands, e-mail: log4j-dev-h...@logging.apache.org >>>> <mailto:log4j-dev-h...@logging.apache.org> >>>> >>>> >> >> >