sharanggupta opened a new pull request, #4413: URL: https://github.com/apache/logging-log4j2/pull/4413
`RollingAppenderCountTest` has been `@Ignore`d on `2.x` since it was found to be flaky in [LOG4J2-3522](https://issues.apache.org/jira/browse/LOG4J2-3522). The fix for that issue, 4387a2f3ce, only went to `main`. It replaced the `Thread.sleep(250)` between the log events with a `RolloverListener` and a `CountDownLatch`, and wrote more data per iteration. This ports that approach to the `2.x` test, keeping its JUnit 4 rule. The test registers itself as a `RolloverListener` on the `RollingFile` manager, logs 60 iterations without sleeping, waits for at least 16 rollovers, and then checks the 17 files in the test method instead of in `@AfterClass`. It no longer sleeps for 15 seconds. `./mvnw -pl :log4j-core-test -am verify -Dtest=RollingAppenderCountTest` passes locally on JDK 17, in every Surefire execution of `log4j-core-test`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
