On Fri, 29 Nov 2024 09:31:26 GMT, Volkan Yazıcı <d...@openjdk.org> wrote:

>> [8343791](https://bugs.openjdk.org/browse/JDK-8343791) (addressed by #22160) 
>> stresses that `Socket::connect()` failures should be handled such that the 
>> resultant state of the `Socket` and its underlying `SocketImpl` should 
>> match. In a similar fashion, `Socket::new` (which is using `bind()` and 
>> `connect()` under the hood) failures should not leave behind an open 
>> `SocketImpl` either. This change set, addressing 
>> [8345176](https://bugs.openjdk.org/browse/JDK-8345176), adds `CtorFailTest` 
>> verifying this behavior.
>
> Volkan Yazıcı has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Further simplify the test

test/jdk/java/net/Socket/CtorFailTest.java line 211:

> 209:             throw new UnsupportedOperationException();
> 210:         }
> 211: 

IIRC Junit should print the test method arguments before running a test. I'd 
suggest adding a toString here, so that when a test fails we know which 
scenario is failing.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22439#discussion_r1863455861

Reply via email to