RFR: 8335771: Improve stability of java/nio/channels/DatagramChannel tests

Daniel Fuchs dfuchs at openjdk.org
Fri Jul 5 10:56:29 UTC 2024


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.

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

Commit messages:
 - 8335771

Changes: https://git.openjdk.org/jdk/pull/20050/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20050&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8335771
  Stats: 367 lines in 11 files changed: 264 ins; 20 del; 83 mod
  Patch: https://git.openjdk.org/jdk/pull/20050.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20050/head:pull/20050

PR: https://git.openjdk.org/jdk/pull/20050


More information about the nio-dev mailing list