Hi Alan, That’s much more concise. Thanks for the tip!
I’ve incorporated it into the updated webrev below. http://cr.openjdk.java.net/~pconcannon/8246132/webrevs/webrev.01/ <http://cr.openjdk.java.net/~pconcannon/8246132/webrevs/webrev.01/> Kind regards, Patrick > On 5 Jun 2020, at 06:33, Alan Bateman <alan.bate...@oracle.com> wrote: > > > > On 04/06/2020 22:08, Daniel Fuchs wrote: >> Hi Patrick, >> >> Looks good, but for one thing. >> >> Throwing in the failed() callback will probably accomplish >> nothing since that is likely be called asynchronously in some >> background thread. So if the connect doesn't succeed immediately >> but fail instead at a later time, the test will block forever >> waiting on the CountDownLatch until it gets interrupted by >> the jtreg timeout. >> >> Instead of using a CountDownLatch, I'd suggest using a >> CompletableFuture<Boolean> which will allow to rethrow >> the exception from the main thread. > Might be simpler to just change it to c.connect(remote).get(); to that it > blocks until the connect is established (or it fails), no need to use the > 3-arg connect method here. > > -Alan