RFR: 8309329: com/sun/jdi/DeferredStepTest.java fails with virtual threads due to not waiting for threads to exit
Alex Menkov
amenkov at openjdk.org
Fri Jun 2 00:09:09 UTC 2023
On Thu, 1 Jun 2023 23:03:47 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
> Virtual threads are always daemon threads, so tests that previously did not explicitly wait for test threads to exit sometimes fail with virtual threads due to the test exiting before the test threads have exited. A join() for each test thread is needed to fix this issue.
>
> com/sun/jdi/DeferredStepTest.java is one such tests. I looked at the other com/sun/jdi failures listed in [JDK-8285422](https://bugs.openjdk.org/browse/JDK-8285422) and didn't see any others that might be failing for this same reason.
>
> I tested locally with `JTREG_TEST_THREAD_FACTORY=Virtual`. I'll also run the appropriate mach5 tier that tests com/sun/jdi with virtual threads.
test/jdk/com/sun/jdi/DeferredStepTest.java line 80:
> 78: Thread jj2 = TestScaffold.newThread(obj2, "jj2");
> 79: jj1.start();
> 80: jj2.start();
It looks strange that there are no errors about conflict between variable names and class names.
Anyway I think it would be better to rename the variables
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14275#discussion_r1213789142
More information about the serviceability-dev
mailing list