RFR: 8249825: Tests sun/security/ssl/SSLSocketImpl/SetClientMode.java and NonAutoClose.java marked with @ignore [v3]

Artur Barashev abarashev at openjdk.org
Thu Mar 20 18:05:14 UTC 2025


On Thu, 20 Mar 2025 12:07:54 GMT, Fernando Guallini <fguallini at openjdk.org> wrote:

>> The following tests are marked with @ignore (not running):
>> 
>> - sun/security/ssl/SSLSocketImpl/SetClientMode.java: it checks that setting the clientMode after the handshake has begun is not permitted, but this was failing intermittently due to a race condition, it was possible that SetClientMode was called before the client socket was updated with handshake isNegotiated = true. The fix is to introduce a latch to sync between client and main threads. Included additional refactoring to ensure test stability.
>> 
>> - sun/security/ssl/SSLSocketImpl/NonAutoClose.java: This test should only run in TLS <= 1.2, as TLSv1.3 changes the behaviour of close_notify. Included additional refactoring to ensure test stability.
>> 
>> Executed both tests 10K times, no test flakiness found
>
> Fernando Guallini has updated the pull request incrementally with one additional commit since the last revision:
> 
>   latch await

test/jdk/sun/security/ssl/SSLSocketImpl/SetClientMode.java line 110:

> 108:                 } catch (IllegalArgumentException iae) {
> 109:                     System.out.println("succeeded, we can't set the client mode");
> 110:                 }

I suggest using `runAndCheckException` from /test/lib here instead of try/catch construct.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23898#discussion_r2006185175


More information about the security-dev mailing list