RFR: 8347173: java/net/DatagramSocket/InterruptibleDatagramSocket.java fails with virtual thread factory

Jaikiran Pai jpai at openjdk.org
Mon Jan 13 14:27:57 UTC 2025


Can I please get a review for this test-only change which proposes to skip this test when the `main()` is launched through a virtual thread?

This test was introduced in https://bugs.openjdk.org/browse/JDK-8233018 , before virtual threads were introduced. In its current form the test doesn't take into account the specification of `DatagramSocket.receive()` when a virtual thread is doing the `receive()`. There's already the `test/jdk/java/net/vthread/BlockingSocketOps.java` test which exercises the `receive()` through a virtual thread and verifies its specified behaviour, so we can skip this `InterruptibleDatagramSocket` test when a virtual thread is involved.

With the proposed change, the test no longer fails and is reported as skipped by jtreg.

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

Commit messages:
 - 8347173: java/net/DatagramSocket/InterruptibleDatagramSocket.java fails with virtual thread factory

Changes: https://git.openjdk.org/jdk/pull/23074/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23074&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8347173
  Stats: 5 lines in 1 file changed: 4 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/23074.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23074/head:pull/23074

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


More information about the net-dev mailing list