RFR: 8294437: java/nio/channels/FileChannel tests slow on Windows [v4]
Alan Bateman
alanb at openjdk.org
Fri Sep 30 11:15:30 UTC 2022
On Fri, 30 Sep 2022 10:53:08 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
>> Please review this test-only change that improves the execution speed of a few FileChannel tests:
>> - Transfer2GPlus, Transfer4GBFile, and TransferTo6GBFile were modified to use sparse files. Their speed is now consistent across platforms, provided that the platform / filesystem supports sparse files.
>> - LargeMapTest was rewritten to use sparse files, and to more precisely target the issue it was written to detect. In my tests it still crashed with EXCEPTION_ACCESS_VIOLATION when JDK-8286637 was reverted.
>> - MapTest: repetition was removed from `testForce` method; I'm not sure what issues it was supposed to catch, but at far as I can tell, it was only triggering timeouts, see [JDK-8289526](https://bugs.openjdk.org/browse/JDK-8289526), [JDK-8224480](https://bugs.openjdk.org/browse/JDK-8224480)
>
> Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix file attributes
I think this version looks okay and probably okay drop the loop from testForce. It's probably best to wait until @bplb gets to see the updated version as he has been doing most of the work in this area recently.
test/jdk/java/nio/channels/FileChannel/TransferTo6GBFile.java line 63:
> 61: out.println(" Writing large file...");
> 62: long t0 = System.nanoTime();
> 63: FileChannel fc = FileChannel.open(file, READ, WRITE);
You can probably change this to use try-with-resources too and maybe "READ" can be dropped as this loo just writes to the file.
-------------
Marked as reviewed by alanb (Reviewer).
PR: https://git.openjdk.org/jdk/pull/10464
More information about the nio-dev
mailing list