RFR: 8295798: (ch) Test java/nio/channels/Channels/ReadXBytes.java is very slow on Windows
Alan Bateman
alanb at openjdk.org
Mon Oct 24 13:13:53 UTC 2022
On Mon, 24 Oct 2022 12:27:51 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
> Please review this PR that reduces the number of bytes written by ReadXBytes test on machines supporting sparse files.
>
> Before this change the `createFileWithRandomContent` function would usually write either the last byte only, or the entire file (`long p` was usually set to length - 1). Now the function only writes the first and the last 32kB, and the remaining bytes are initialized in platform-defined manner.
>
> Before this change the test took between 1-10 minutes to complete on our Windows CI machines.
> After this change the test finishes in less than 1 minute.
This looks good, I assume you'll update the end date in the header before you integrate.
-------------
Marked as reviewed by alanb (Reviewer).
PR: https://git.openjdk.org/jdk/pull/10834
More information about the nio-dev
mailing list