RFR: 8114830: (fs) Files.copy fails due to interference from something else changing the file system [v8]

Vyom Tewari vtewari at openjdk.org
Thu Aug 10 17:04:58 UTC 2023


On Thu, 10 Aug 2023 12:16:17 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> test/jdk/java/nio/file/Files/CopyInterference.java line 91:
>> 
>>> 89:     private static Stream<Arguments> pathAndOptionsProvider()
>>> 90:         throws IOException {
>>> 91:         Path parent = Path.of(System.getProperty("test.dir", "."));
>> 
>> I will suggest you to use "java.io.tmpdir" instead of "test.dir" so that all dir/files will get created in 'tmp' directory.
>
>> I will suggest you to use "java.io.tmpdir" instead of "test.dir" so that all dir/files will get created in 'tmp' directory.
> 
> The problem with java.io.tmpdir is that it will fail up /tmp (or equivalent). Also one advantage of using the test work directory is that it will be archived with the test results so it can, in many tests, help with diagnosing why the test failed.

yep it make sense , i suggested because directory/files are not getting cleaned up after test  run.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15141#discussion_r1290418007


More information about the nio-dev mailing list