On Wed, 27 Nov 2024 16:18:32 GMT, Alan Bateman <al...@openjdk.org> wrote:
> ConnectTestFail could be changed to use parameterized tests with a method > source than produces a Socket and SocketChannel.open().socket(). If you had > that then it could eliminate the duplicate tests and would allow most or all > of the functional interfaces to be removed. @AlanBateman, I guess I went too far motivated by your earlier remark on using _"a small subset of the features that JUnit provides"_. Introduced `@ParameterizedTest` back. This did not help much with the custom functional interfaces; I replaced them with their JUnit alternatives. > I think it good to find shorter names for many of the methods and variables > as they are way too long in places, e.g. > connectedSocketShouldNotBeClosedWhenConnectWithUnresolvedAddressFails. Shortened them. > Did you mean to leave ThrowingSocketImpl in the PR, I thought that was for > the other issue. It was an oversight. Deleted. > Also are you expecting ServerSocketTestUtil to be used by other tests? Yes, but we can always do that later. Moved `ServerSocketTestUtil::withEphemeralServerSocket()` into `ConnectFailTest`. ------------- PR Comment: https://git.openjdk.org/jdk/pull/22160#issuecomment-2505607782