patricklucas commented on code in PR #22987: URL: https://github.com/apache/flink/pull/22987#discussion_r1272567509
########## flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestClientTest.java: ########## @@ -207,6 +210,40 @@ public void testRestClientClosedHandling() throws Exception { } } + /** + * Tests that the futures returned by {@link RestClient} fail immediately if the client is + * already closed. + * + * <p>See FLINK-32583 + */ + @Test + public void testCloseClientBeforeRequest() throws Exception { Review Comment: Cool, good find, I'll try it out. Regarding the exception, I've started to feel that maybe `IOException` actually _isn't_ the best choice, since no true IO (e.g. via syscalls) is happening at the time of the failure. Even if we take an analogous example of trying to write to a file that's closed, the error would often come from the failure of the syscall to write. In this situation, the client is in fact in an illegal state (closed) for making requests. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org