RFR: 8251188: Update LDAP tests not to use wildcard addresses
Daniel Fuchs
dfuchs at openjdk.java.net
Tue Sep 22 12:36:09 UTC 2020
On Fri, 18 Sep 2020 12:59:07 GMT, Aleksei Efimov <aefimov at 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
Very good and thorough fix Aleksei! This looks mostly very good to me - and I have only one doubt, which I commented on
in the code.
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?
-------------
PR: https://git.openjdk.java.net/jdk/pull/252
More information about the core-libs-dev
mailing list