This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push: new 0e099db5df Make test more robust (CI failure observed for 8.5.x) 0e099db5df is described below commit 0e099db5df2f08e1e214c4203bc379a03cf3f88a Author: Mark Thomas <ma...@apache.org> AuthorDate: Mon Sep 5 13:52:37 2022 +0100 Make test more robust (CI failure observed for 8.5.x) --- test/org/apache/juli/TestAsyncFileHandlerOverflow.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/org/apache/juli/TestAsyncFileHandlerOverflow.java b/test/org/apache/juli/TestAsyncFileHandlerOverflow.java index 48874b457b..a7d2435a3f 100644 --- a/test/org/apache/juli/TestAsyncFileHandlerOverflow.java +++ b/test/org/apache/juli/TestAsyncFileHandlerOverflow.java @@ -105,8 +105,16 @@ public class TestAsyncFileHandlerOverflow { @Override public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { - latch.countDown(); + // Generally, the latch needs to be released after the + // RejectedExecutionHandler has completed but for the flush case + // the latch needs to be released first (else the test loops) + if (overflowDropType == AsyncFileHandler.OVERFLOW_DROP_FLUSH) { + latch.countDown(); + } rejectionHandler.rejectedExecution(r, executor); + if (overflowDropType != AsyncFileHandler.OVERFLOW_DROP_FLUSH) { + latch.countDown(); + } } }); this.handler = new AsyncFileHandler(logsDir.toString(), PREFIX, SUFFIX, Integer.valueOf(1), loggerService); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org