RFR: 8313674: java/nio/channels/FileChannel/BlockDeviceSize.java should test for more block devices
Alan Bateman
alanb at openjdk.org
Wed May 1 07:00:56 UTC 2024
On Tue, 30 Apr 2024 13:21:36 GMT, Inigo Mediavilla Saiz <duke at openjdk.org> wrote:
> 8313674: java/nio/channels/FileChannel/BlockDeviceSize.java should test for more block devices
Extending the test looks okay. If the person assigned is okay with you taking it then it should be okay to continue.
test/jdk/java/nio/channels/FileChannel/BlockDeviceSize.java line 51:
> 49: public static void main(String[] args) throws Throwable {
> 50: for (String blkFname: BLK_FNAMES) {
> 51: Path blkPath = getBlkPath(blkFname);
You can replace this with Path.of(blkFname), no need for the getBlkPath method.
test/jdk/java/nio/channels/FileChannel/BlockDeviceSize.java line 57:
> 55: long size1 = ch.size();
> 56: long size2 = file.length();
> 57: if (size1 != size2) {
A passing comment on this test is that it just checks that FC::size and RAF::size return the same size. We are sitting on prototype changes that reimplement RAF on FC so it won't be comparing two different implementations if that goes ahead. It will at least test that the size method doesn't throw.
-------------
PR Review: https://git.openjdk.org/jdk/pull/19021#pullrequestreview-2033130597
PR Review Comment: https://git.openjdk.org/jdk/pull/19021#discussion_r1585949136
PR Review Comment: https://git.openjdk.org/jdk/pull/19021#discussion_r1585950400
More information about the nio-dev
mailing list