-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
3.3.0.Beta2
When running unit tests on Win7 (x64) the UdpChannelTestCase#optionSetup fails with
optionSetup(org.xnio.nio.test.UdpChannelTestCase) Time elapsed: 0.008 sec <<< ERROR! java.net.SocketException: Invalid argument: no further information at sun.nio.ch.Net.getIntOption0(Native Method) at sun.nio.ch.Net.getSocketOption(Net.java:392) at sun.nio.ch.DatagramChannelImpl.getOption(DatagramChannelImpl.java:270) at org.xnio.nio.NioUdpChannel.getOption(NioUdpChannel.java:309) at org.xnio.nio.test.UdpChannelTestCase.optionSetup(UdpChannelTestCase.java:493)
Seen this on master and 3.x.
The following 3 lines cause the Exception:
diff --git a/nio-impl/src/test/java/org/xnio/nio/test/UdpChannelTestCase.java b/nio-impl/src/test/java/org/xnio/nio/test/UdpChannelTestCase.java index f142d0f..5035e14 100644 --- a/nio-impl/src/test/java/org/xnio/nio/test/UdpChannelTestCase.java +++ b/nio-impl/src/test/java/org/xnio/nio/test/UdpChannelTestCase.java @@ -490,13 +490,13 @@ public class UdpChannelTestCase { assertTrue(server.supportsOption(Options.IP_TRAFFIC_CLASS)); assertNotNull(server.getOption(Options.IP_TRAFFIC_CLASS)); assertTrue(server.supportsOption(Options.MULTICAST_TTL)); - assertNotNull(server.getOption(Options.MULTICAST_TTL)); + //assertNotNull(server.getOption(Options.MULTICAST_TTL)); assertFalse(server.setOption(Options.BROADCAST, true)); assertTrue(server.setOption(Options.RECEIVE_BUFFER, 30000) > 0); assertTrue(server.setOption(Options.SEND_BUFFER, 3000) > 0); assertNotNull(server.setOption(Options.IP_TRAFFIC_CLASS, 200)); - assertNotNull(server.setOption(Options.MULTICAST_TTL, 150)); + //assertNotNull(server.setOption(Options.MULTICAST_TTL, 150)); assertNull(server.setOption(Options.REUSE_ADDRESSES, true)); assertTrue(server.getOption(Options.BROADCAST)); @@ -504,7 +504,7 @@ public class UdpChannelTestCase { assertEquals(3000, (int) server.getOption(Options.SEND_BUFFER)); assertNotNull((int) server.getOption(Options.IP_TRAFFIC_CLASS)); // it is okay that 200 is not returned // 200 will only be set if the channels' family equals StandardProtocolFamily.INET - assertEquals(150, (int) server.getOption(Options.MULTICAST_TTL)); + //assertEquals(150, (int) server.getOption(Options.MULTICAST_TTL)); assertNull(server.getOption(Options.REUSE_ADDRESSES)); } finally { server.close();
It fails on 1.8.0_11 as well.