RFR: 8294375: test/jdk/java/nio/channels/vthread/BlockingChannelOps.java is slow [v3]
Jaikiran Pai
jpai at openjdk.org
Wed Sep 28 12:02:21 UTC 2022
On Wed, 28 Sep 2022 11:08:26 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> BlockingChannelOps.java and BlockingSocketOps.java test virtual threads doing blocking I/O on channels and java.net sockets.
>>
>> BlockingChannelOps has 32 tests at this time and takes nearly 120s to run due to several tests that sleep to improve the chances that threads are blocked. These sleeps can be replaced with a poll of the thread state so the test runs in 3-4s. BlockingSocketOps has be changed to do the same time.
>>
>> In passing, I updated the tests in BlockingSocketOps that bound a ServerSocket to the wildcard address so they bind to the loopback address instead. This helps reduce potential interference in CI environments. I also put a workaround into BlockingChannelOps for macOS where the kernel appears to increase the amount of bytes that can be buffered in the socket sender buffer, it's otherwise too hard to test that socket writes block on that platform.
>
> Alan Bateman has updated the pull request incrementally with one additional commit since the last revision:
>
> Drop /timeout from run tags. Fix out of date comment
Thank you for those changes. The current state of this PR looks fine to me.
-------------
Marked as reviewed by jpai (Reviewer).
PR: https://git.openjdk.org/jdk/pull/10427
More information about the nio-dev
mailing list