Integrated: 8365893: test/jdk/java/lang/Thread/virtual/JfrEvents.java failing intermittently
Alan Bateman
alanb at openjdk.org
Sun Aug 24 16:24:54 UTC 2025
On Sun, 24 Aug 2025 07:59:05 GMT, Alan Bateman <alanb at 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 <alanb at 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
More information about the core-libs-dev
mailing list