RFR: 8272964: java/nio/file/Files/InterruptCopy.java fails with java.lang.RuntimeException: Copy was not interrupted

Brian Burkhalter bpb at openjdk.java.net
Wed Aug 25 23:43:38 UTC 2021


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.

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

Commit messages:
 - 8272964: java/nio/file/Files/InterruptCopy.java fails with java.lang.RuntimeException: Copy was not interrupted

Changes: https://git.openjdk.java.net/jdk/pull/5260/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5260&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8272964
  Stats: 10 lines in 1 file changed: 7 ins; 1 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5260.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5260/head:pull/5260

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


More information about the nio-dev mailing list