On Tue, 29 Mar 2022 17:09:37 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
> I would not expect that throwing an AssertionError in the handler on the > server side would make the client (and the test) fail (except maybe in > timeout?). I'd suggest printing a message on System.err and sending a > different error code (like 400 for instance) if expectations are not met, and > have the client side checks that it receives 200. @dfuch Yes you're correct. I've just verified there that when there is a failure in the test's current state it is the handleResponse() method that throws an IO Exception rather than an AssertionError from the test methods. I think as you suggest, handling the Test Errors by response codes sent from the server makes the most sense in this case. ------------- PR: https://git.openjdk.java.net/jdk/pull/8017