RFR: 8334297: (so) java/nio/channels/SocketChannel/OpenLeak.java should not depend on SecurityManager [v5]

Daniel Fuchs dfuchs at openjdk.org
Tue Jun 18 11:13:10 UTC 2024


On Tue, 18 Jun 2024 07:02:32 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Refactor to ParameterizedTest. Do not test for refused connection on Windows Server 2016
>
> test/jdk/java/nio/channels/SocketChannel/OpenLeak.java line 109:
> 
>> 107:         cases.add(new Object[]{sa, UnresolvedAddressException.class});
>> 108:         cases.add(new Object[]{isa, ConnectException.class});
>> 109:         return cases;
> 
> A somewhat subjective comment but I don't think I would add the SocketAddress to the list of test cases when its value is null. So if there isn't a suitable port then it would just reduce the set of test cases.

The reason I do that is to record the testcase for ConnectException as aborted (Assumptions.abort will be called, and it will appear in the summary). But maybe that's not useful? There are only two test cases anyway: one for unresolved address and one for connection refused.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19723#discussion_r1644272080


More information about the nio-dev mailing list