RFR: 8327650: Test java/nio/channels/DatagramChannel/StressNativeSignal.java timed out
Alan Bateman
alanb at openjdk.org
Tue May 21 19:44:01 UTC 2024
On Tue, 21 May 2024 17:59:38 GMT, Mark Sheppard <msheppar at openjdk.org> wrote:
>> test/jdk/java/nio/channels/DatagramChannel/StressNativeSignal.java line 89:
>>
>>> 87: } catch (Exception ignore) {
>>> 88: System.err.println("ServerSocketThread: caught exception " + ignore.getClass().getName());
>>> 89: System.err.println("continue ...");
>>
>> Continue if creating the ServerSocket fails looks bad. Can this move to the ServerSocketThread constructor so that it's not in the run method?
>
> I can do that, but the change is just maintaining the existing call flow, which would have any exception caught and continues with a stack trace dump. In this case we continue countdown the latch, an NPE is thrown, caught with stack trace and finish.
> But we'll move to a Constructor as suggested.
The catching of Exception looks like it's new code in this PR, did I mis-read it? In any case, I think it will be much better to do this in the constructor. Same thing in UDPThread where the code in the run method to catch IOException + continue is very surprising.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19312#discussion_r1608868307
More information about the nio-dev
mailing list