On Sun, 24 Aug 2025 07:59:05 GMT, Alan Bateman <al...@openjdk.org> wrote:
> Under load conditions, testVirtualThreadStartAndEnd can fail because the JFR > recording doesn't have a VirtualThreadEndEvent recorded for all virtual > threads. This is a test issue. ExecutorService::close waits for all tasks > (not threads) to finish. For ThreadPerTaskExecutor the thread terminates > after executing the task but there is still a small window between task > completion and thread termination. The test is changed to use Thread::join > so it waits for the 100 threads to terminate, avoid the fragile sleep that we > had in the original test. This pull request has now been integrated. Changeset: 58e75815 Author: Alan Bateman <al...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/58e7581527208dfd6dd694793e4790dcad8fc3ef Stats: 8 lines in 1 file changed: 3 ins; 1 del; 4 mod 8365893: test/jdk/java/lang/Thread/virtual/JfrEvents.java failing intermittently Reviewed-by: jpai ------------- PR: https://git.openjdk.org/jdk/pull/26916