[jdk8u-dev] RFR: 8237834: com/sun/jndi/ldap/LdapDnsProviderTest.java failing with LDAP response read timeout

Severin Gehwolf sgehwolf at openjdk.org
Wed Feb 18 15:28:29 UTC 2026


On Wed, 4 Feb 2026 01:56:53 GMT, Takuya Kiriyama <tkiriyama at openjdk.org> wrote:

> Hi All,
> 
> JDK-8237834 is being backported from JDK 15 to JDK 8 to resolve instability and test failures in the JDK's LDAP DNS provider test. The issue stems from indefinite waits for LDAP responses when tests connect to unintended services on hardcoded localhost ports. The fix introduces a retry mechanism using different random ports until a "connection refused" error is received, and improves logging for better diagnostic insights, ultimately enhancing test robustness by preventing intermittent failures.
> 
> Additionally, this backport is equivalent to the fix applied in JDK 11 except with the @module annotation. This equivalence ensures consistency and demonstrates that the adjustments are robust and have been previously validated on other versions.
> 
> Would anyone review this fix?
> 
> Thank you.

This looks fine, but differs from the JDK 11u version slightly. Why?

See: https://github.com/openjdk/jdk11u-dev/commit/995d6204234935bf23292762c6c929e2a3f009a1#diff-02ac29783c37146af717f312ff9c3810e47c6794034aa09a4e00baed3bac84e9R258

jdk/test/com/sun/jndi/ldap/LdapDnsProviderTest.java line 258:

> 256: 
> 257:             System.err.printf("Iteration %d: Testing: url='%s', expected content='%s'%n",
> 258:                     attempt, url, expected);

Suggestion:

            System.err.printf("Iteration %d: Testing: %s, %s%n", attempt, url, expected);

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

PR Review: https://git.openjdk.org/jdk8u-dev/pull/756#pullrequestreview-3820517507
PR Review Comment: https://git.openjdk.org/jdk8u-dev/pull/756#discussion_r2822881717


More information about the jdk8u-dev mailing list