On Tue, 17 May 2022 14:55:11 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

> I am a bit less sure about moving the post-asserts inside the loop

I moved them because they too can fail if the original blocked future suddenly 
completes.
Side effect of this change is that any failures that happen after 
websocket.abort will be retried (isDone will return true). I think this is 
acceptable.

> or closing before asserting that the cf hangs, but if I understand the logic 
> correctly it seems ok too.

`assertHangs` essentially just waits for five seconds to see if the future 
finishes in the meantime. With the proposed change we are waiting for 2 futures 
at the same time.

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

PR: https://git.openjdk.java.net/jdk/pull/8746

Reply via email to