-
Bug
-
Resolution: Fixed
-
P4
-
17
-
b26
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8321805 | 11-pool-oracle | Weibing Xiao | P4 | Closed | Withdrawn |
The probable cause is that the network interface is being reconfigured while the test is running.
The line that fails is:
assertTrue(s.getOption(IP_MULTICAST_IF).equals(ni));
Comparing two instances of NetworkInterface for equality is problematic because NetworkInterface::equals also compare the addresses bound to the network interface, and each instance of NetworkInterface has a snapshot of the addresses taken at the time the instance is created.
The test should be improved to only compare NetworkInterface name/index.
java.lang.RuntimeException
at DatagramSocketMulticasting.assertTrue(DatagramSocketMulticasting.java:363)
at DatagramSocketMulticasting.testNetworkInterface(DatagramSocketMulticasting.java:242)
at DatagramSocketMulticasting.test(DatagramSocketMulticasting.java:106)
at DatagramSocketMulticasting.main(DatagramSocketMulticasting.java:88)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:831)
The line that fails is:
assertTrue(s.getOption(IP_MULTICAST_IF).equals(ni));
Comparing two instances of NetworkInterface for equality is problematic because NetworkInterface::equals also compare the addresses bound to the network interface, and each instance of NetworkInterface has a snapshot of the addresses taken at the time the instance is created.
The test should be improved to only compare NetworkInterface name/index.
java.lang.RuntimeException
at DatagramSocketMulticasting.assertTrue(DatagramSocketMulticasting.java:363)
at DatagramSocketMulticasting.testNetworkInterface(DatagramSocketMulticasting.java:242)
at DatagramSocketMulticasting.test(DatagramSocketMulticasting.java:106)
at DatagramSocketMulticasting.main(DatagramSocketMulticasting.java:88)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
at java.base/java.lang.Thread.run(Thread.java:831)
- backported by
-
JDK-8321805 java/net/DatagramSocket/DatagramSocketMulticasting.java fails infrequently
-
- Closed
-