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

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


On Wed, 6 Sep 2023 11:59:51 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 61:
> 
>> 59:                 e.printStackTrace();
>> 60:             } finally {
>> 61:                 System.out.println("Test FAILED");
> 
> don't you think "Test FAILED" will print always ?

Hi vyommani. There are two situations in which this sentence is executed, one is that it loops for 10 seconds (this will not happen on the JDK I repaired), and the other is that the sleep is interrupted (it will not happen).
I ran the test on the JDK containing my fix and watched stdout, the message was indeed not printed and the test passed. On the JDK before the repair, it will print, and the test will fail.
But in order to make this code look clearer, I removed 'finnaly'.

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

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


More information about the jdk-updates-dev mailing list