On Tue, 7 Apr 2026 15:22:02 GMT, Daniel Fuchs <[email protected]> wrote:

>> Some more TestNG -> JUnit conversion for java/net tests.
>> This change converts tests under:
>> 
>>     test/jdk/java/net/DatagramSocketImpl/
>>     test/jdk/java/net/MulticastSocket/
>>     test/jdk/java/net/Socket/
>>     test/jdk/java/net/SocketImpl/
>
> Daniel Fuchs has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   EOF not expected

I skimmed through all the latest changes, only concern is the added comments to 
ConnectionReset.

test/jdk/java/net/Socket/ConnectionReset.java line 53:

> 51:     @Test
> 52:     public void testAvailableBeforeRead1() throws IOException {
> 53:         System.err.println("testAvailableBeforeRead1");

I don't think the trace messages to announce the start of the test method are 
needed now as there will be JUnit messages for the start/end of the test.

test/jdk/java/net/Socket/ConnectionReset.java line 90:

> 88:                     int bytesRead = in.read();
> 89:                     // EOF is not expected, we should get an IOException
> 90:                     // before EOF.

I think this comment should be dropped as EOF is just not expected.

test/jdk/java/net/Socket/ConnectionReset.java line 95:

> 93:                     System.err.println("read => 1 byte");
> 94:                     // we should get an IOException before reading
> 95:                     // the last byte

This comment is confusing too, it should not read bytes after IOException is 
thrown.

test/jdk/java/net/Socket/ConnectionReset.java line 146:

> 144:                     int bytesRead = in.read();
> 145:                     // EOF is not expected, we should get an IOException
> 146:                     // before EOF.

Same issue with this comment.

test/jdk/java/net/Socket/ConnectionReset.java line 151:

> 149:                     System.err.println("read => 1 byte");
> 150:                     // we should get an IOException before reading
> 151:                     // the last byte

Same issue with this comment.

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

PR Review: https://git.openjdk.org/jdk/pull/30564#pullrequestreview-4074007004
PR Review Comment: https://git.openjdk.org/jdk/pull/30564#discussion_r3050301537
PR Review Comment: https://git.openjdk.org/jdk/pull/30564#discussion_r3050365941
PR Review Comment: https://git.openjdk.org/jdk/pull/30564#discussion_r3050372033
PR Review Comment: https://git.openjdk.org/jdk/pull/30564#discussion_r3050374955
PR Review Comment: https://git.openjdk.org/jdk/pull/30564#discussion_r3050375407

Reply via email to