On Wed, 16 Aug 2023 23:10:02 GMT, Weibing Xiao <d...@openjdk.org> wrote:
>> test/jdk/com/sun/jndi/ldap/LdapSSLHandshakeFailureTest.java line 173: >> >>> 171: public void run() { >>> 172: try (Socket socket = serverSocket.accept()) { >>> 173: Thread.sleep(10000); >> >> What's the purpose of the sleep ? >> Regardless, based on the test semantics alluded in the test name, the server >> should never enter the read block. So is this code redundant? Or is it there >> just in case the accept and the handshake succeeds? > > It will slow down the handshake process after the socket is created and > connected with the server. The bug is showing the handshake failure and the > socket is not closed properly. OK, So the SSL handshake must take place within the getInputStream call rather than the accept, as such you are triggering a timeout on the SSL handshake. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15294#discussion_r1296530516