-
Bug
-
Resolution: Unresolved
-
P4
-
19
The test/jdk/java/net/DatagramSocket/InterruptibleDatagramSocket.java test invokes the DatagramSocket.receive() method while a concurrent thread interrupts the thread that is doing the receive(). The test then expects an exception to be raised on the thread which was doing the receive().
The test then asserts this exception. One part of that assertion is as follows:
catch (SocketException e) {
if ((e.getCause() instanceof ClosedByInterruptException) && interruptible) {
System.out.println("Got expected ClosedByInterruptException: " + e);
} else {
throw e;
}
So the test expects the receive() may throw a SocketException whose cause is a ClosedByInterruptException. However, the DatagramSocket.receive() doesn't specify that the SocketException will have that cause.
The test will have to be re-evaluated and maybe updated to fix this part.
The test then asserts this exception. One part of that assertion is as follows:
catch (SocketException e) {
if ((e.getCause() instanceof ClosedByInterruptException) && interruptible) {
System.out.println("Got expected ClosedByInterruptException: " + e);
} else {
throw e;
}
So the test expects the receive() may throw a SocketException whose cause is a ClosedByInterruptException. However, the DatagramSocket.receive() doesn't specify that the SocketException will have that cause.
The test will have to be re-evaluated and maybe updated to fix this part.
- relates to
-
JDK-8233018 Add a new test to verify that DatagramSocket is not interruptible
-
- Resolved
-
- links to
-
Review(master) openjdk/jdk/23135