This is a test only change to a test that exercises core reflection from virtual threads. One of the its tests (testNewInstance6) uses a custom scheduler in setup to check that calling a constructor reflectively, where the constructor parks, doesn't pin the underlying carrier. The test schedules an unpark from a virtual thread but the test is missing a call to Thread::join, thus creating a race between shutdown of the scheduler and the unpark. Two sightings of the test failing so far, both -Xcomp and ZGC.
While in the area, two usages of Thread.sleep in the test have been replaced with latches. ------------- Commit messages: - Initial commit Changes: https://git.openjdk.org/jdk/pull/15073/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15073&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8311989 Stats: 20 lines in 1 file changed: 15 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/15073.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15073/head:pull/15073 PR: https://git.openjdk.org/jdk/pull/15073