RFR [14] 8151678: com/sun/jndi/ldap/LdapTimeoutTest.java failed due to timeout on DeadServerNoTimeoutTest is incorrect
Pavel Rappo
pavel.rappo at oracle.com
Fri Aug 30 10:53:11 UTC 2019
//
// Dear maintainer:
//
// Once you are done trying to 'optimize' this routine,
// and have realized what a terrible mistake that was,
// please increment the following counter as a warning
// to the next guy:
//
// total_hours_wasted_here = 42
//
--- [1]
Hello,
Please review the following change:
http://cr.openjdk.java.net/~prappo/8151678/webrev.00/
Testing timeouts is not an easy task. The test in question has always been
problematic. There have been many attempts to address the unreliability of that
test and during its lifetime the test has been tagged (and subsequently
untagged) as intermittent and eventually was put into the problem list.
The proposed change overhauls the test and patches the code that the test
exercises.
The code change addresses the multithreading issue associated with 8160768 [2].
This issue manifests itself as different runtime exceptions that are thrown
rather quickly from calls that the test expects to block for a substantial
amount of time. Since that test catches this issue reliably, no new tests are
introduced.
The overhauled test is excluded from the problem list. Before doing so I had run
the test on all the platforms for some 40,000 (4.0E4) times. I have not
encountered any failures.
And yet I'm under no illusion that this change fixes all the issues. I strongly
suspect that the test will eventually fail again. I’ve attempted to prepare for
that by adding extra diagnostic outputs and improving the usefulness of traces.
-Pavel
-------------------------------------------------------------------------------
[1] https://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered
[2] 8160768: Add capability to custom resolve host/domain names within the default JNDI LDAP provider
More information about the core-libs-dev
mailing list