This test connects to http://openjdk.java.net/ so it's not reliable if the host name can't be resolved or a HTTP connection cannot be established. I've changed the test to use a local HTTP server so the original test works as before, it's just a local rather than remote HTTP connection.
I did a few cleanups to the test while I was there: - changed the test to use `@enablePreview`. - renamed "VThread" in the comment to "virtual thread". - changed the test to use Executors.newVirtualThreadPerTaskExecutor to avoid needing to specify a ThreadFactory. - add a call Future::get so that if the virtual thread terminates with an exception then the test will fail quickly, avoids needing to calling into the native/agent code to check if it passed. ------------- Commit messages: - Merge - Initial commit Changes: https://git.openjdk.org/jdk19/pull/6/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk19&pr=6&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8288214 Stats: 57 lines in 2 files changed: 38 ins; 4 del; 15 mod Patch: https://git.openjdk.org/jdk19/pull/6.diff Fetch: git fetch https://git.openjdk.org/jdk19 pull/6/head:pull/6 PR: https://git.openjdk.org/jdk19/pull/6