RFR: 8304286: java/net/SocketOption/OptionsTest.java failing after JDK-8302659 [v2]

Daniel Fuchs dfuchs at openjdk.org
Mon Mar 20 15:40:17 UTC 2023


On Mon, 20 Mar 2023 11:33:08 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> Please review this change that fixes and reenables OptionsTest on Windows.
>> 
>> The test is checking that the values retrieved from getOption match the values set by an earlier call to setOption. The `IP_MULTICAST_IF` option was tested with the first network interface for which `supportsMulticast` returned true. JDK-8302659 changed the network interface iteration order and the test started failing.
>> 
>> The proposed change is to verify if the interface is actually usable for multicasting before using it in set/get test. Test passed on all platforms.
>
> Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Change interface selection

This appears a better option than before. There is always the chance that a test might pick up an interface that "does not work". Possibly using `NetworkConfiguration`, from the test library, instead of using directly `NetworkInterface.getNetworkInterfaces` would provide more resilience to odd machine configurations.

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

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


More information about the net-dev mailing list