On Tue, 22 Sep 2020 12:30:47 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> Hi, >> >> Please help to review >> [JDK-8251188](https://bugs.openjdk.java.net/browse/JDK-8251188) fix which >> helps to improve LDAP >> tests stability. The list of changes: 1. Usages of wildcard address have >> been replaced with loopback address. This >> change includes addition of `LDAPTestUtils.initEnv` method that takes LDAP >> provider URL as a parameter. 2. >> `DeadServerTimeoutSSLTest.java` was also updated to fix the intermittent >> failures reported by [JDK-8152654 >> ](https://bugs.openjdk.java.net/browse/JDK-8152654) and >> [JDK-8169942](https://bugs.openjdk.java.net/browse/JDK-8169942). Before the >> fix the failure rate was 1 out of 4 runs. >> After the fix it was executed 400+ times alongside to other LDAP tests, and >> showed no failures, and therefore removed >> from the problem list. Thank you, Aleksei > > test/jdk/com/sun/jndi/ldap/DeadSSLLdapTimeoutTest.java line 171: > >> 169: System.err.println("Server socket. Failure to accept >> connection:"); >> 170: e.printStackTrace(); >> 171: } > > I wonder if removing the while (true) loop will make the test more > susceptible of failing in timeout if the server ever > receives a connection request from an unexpected client (we've seen that > happening in the past with networking tests). > Is there anyway the server could attempt to verify that the accepted socket > is from the expected client, and close it > and go back to accepting if it's not? Maybe by looking at the accepted socket > remote address & port? Thanks for the good suggestion Daniel. I will modify it to look at the remote socket's address and port. ------------- PR: https://git.openjdk.java.net/jdk/pull/252