On Sat, 11 Jun 2022 08:11:34 GMT, Alan Bateman <al...@openjdk.org> wrote:

> 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.

Marked as reviewed by lmesnik (Reviewer).

-------------

PR: https://git.openjdk.org/jdk19/pull/6

Reply via email to