Currently, jtreg executes test in MainThreadGroup and check uncaught exceptions for this group. So it handle all exceptions if test doesn't create new thread groups.
However, the virtual threads don't belong to MainThreadGroup and jtreg silently ignore all exceptions throw by virtual threads.
It might be possible to manually check exceptions for any virtual thread in each tests. However, it would be better to improve jtreg to set and check global exception handler.
See example of such issue:
https://bugs.openjdk.org/browse/JDK-8309512
However, the virtual threads don't belong to MainThreadGroup and jtreg silently ignore all exceptions throw by virtual threads.
It might be possible to manually check exceptions for any virtual thread in each tests. However, it would be better to improve jtreg to set and check global exception handler.
See example of such issue:
https://bugs.openjdk.org/browse/JDK-8309512
- relates to
-
JDK-8309512 Test runtime/vthread/RedefineClass.java always passes
- Closed
- links to
-
Review openjdk/jtreg/172