RFR: 8335771: Improve stability of java/nio/channels/DatagramChannel tests
Alan Bateman
alanb at openjdk.org
Mon Jul 8 11:35:33 UTC 2024
On Fri, 5 Jul 2024 10:50:56 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
> Several `java/nio/channels/DatagramChannel` tests fail intermittently. Though it seems difficult to fix all intermittent failures due to the nature of what some of these attempt to test, the stability can still be improved.
>
> The most common source of intermittent failures are:
>
> - not receiving a datagram due to port conflict or interference of concurrent running tests
> - failure to disconnect due to interference of concurrent running tests
> - failure due to reception of unexpected stray datagrams
>
> Avoiding to bind on the wildcard address, filtering unexpected datagram, and some retrying can aleviate some of the issues and greatly reduce the frequency of intermittent failures.
There are several tests modified to introduce some awkward control flow, specifically there are now condition and then code in the body conditionally doing "continue". It would be a lot more readable to have the condition in one place in each of these loops.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20050#issuecomment-2213769542
More information about the nio-dev
mailing list