RFR: 8272964: java/nio/file/Files/InterruptCopy.java fails with java.lang.RuntimeException: Copy was not interrupted
Daniel Fuchs
dfuchs at openjdk.java.net
Thu Aug 26 09:53:26 UTC 2021
On Wed, 25 Aug 2021 23:37:50 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> In the interrupt case, if the copy does not throw an `IOException`, rather than using the copy duration versus a threshold as the criterion for failure, instead check whether the target file does **not** exist, and if it does not, then make the test fail as this would indicate that the copy was in fact interrupted but did not throw an exception in response.
I like that!
-------------
Marked as reviewed by dfuchs (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/5260
More information about the nio-dev
mailing list