[jdk17] RFR: 8268776: Test `ADatagramSocket.java` missing /othervm from @run tag
Patrick Concannon
pconcannon at openjdk.java.net
Wed Jun 16 10:50:40 UTC 2021
Hi,
Could someone please review my change to the test `test/jdk/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.java`? The test is missing `/othervm` from its @run jtreg test tag, which risks polluting other tests that run in that VM.
Currently, any test that runs without `/othervm` after this test would find the `DatagramSocketImpl` factory created by this test, and therefore any call made to new `DatagramSocket()` would return/use a `NetMulticastSocket` instead of `DatagramSocketAdaptor`. This could make tests that create `DatagramSocket`/`MulticastSocket` fail intermittently in unexplainable ways. Adding in `/othervm` to the @run tag will avoid this problem.
Kind regards,
Patrick
-------------
Commit messages:
- 8268776: Test `ADatagramSocket.java` missing /othervm from @run tag
Changes: https://git.openjdk.java.net/jdk17/pull/75/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=75&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8268776
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk17/pull/75.diff
Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/75/head:pull/75
PR: https://git.openjdk.java.net/jdk17/pull/75
More information about the net-dev
mailing list