RFR: 8278166: java/nio/channels/Channels/TransferTo.java timed out

Lance Andersen lancea at openjdk.java.net
Fri Dec 3 23:02:15 UTC 2021


On Fri, 3 Dec 2021 20:07:14 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> In the `testMoreThanTwoGB()` sub-test, only fill the last section of the file with random data in order to reduce test execution time.

Looks OK overall.  Minor comment below

test/jdk/java/nio/channels/Channels/TransferTo.java line 150:

> 148:             try {
> 149:                 // create (hopefully sparse) file less than 2GB in size
> 150:                 final long initLen = (2*1024 - 1)*BYTES_PER_WRITE;

Perhaps consider clarifying the comment for the initLen calculation 

I do suspect the use of RandomAccessFile improves the throughput here

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

Marked as reviewed by lancea (Reviewer).

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


More information about the nio-dev mailing list