[jdk17u-dev] RFR: 8312065: Socket.connect does not timeout when profiling [v4]

Long Yang duke at openjdk.org
Thu Sep 7 03:22:52 UTC 2023


On Wed, 6 Sep 2023 11:58:22 GMT, Vyom Tewari <vtewari at openjdk.org> wrote:

>> Long Yang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   push to trigger github workflows
>
> test/jdk/java/net/Socket/B8312065.java line 73:
> 
>> 71:             socket.connect(new InetSocketAddress("192.168.255.255", 8080), 2000);
>> 72:         } catch (SocketTimeoutException e) {
>> 73:             System.out.println("Test passed");
> 
> i will suggest you to provide a check that test 'socket.connect' throws 'SocketTimeoutException'  only after the time expires.
> 
> store time just before socket connect and in catch block check if time spent is >= timeout specified.

Thanks, updated.

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

PR Review Comment: https://git.openjdk.org/jdk17u-dev/pull/1639#discussion_r1318040102


More information about the jdk-updates-dev mailing list