On Tue, 22 Apr 2025 09:05:09 GMT, Jaikiran Pai <j...@openjdk.org> wrote:

> Can I please get a review of this test only change which proposes to improve 
> the debuggability of `com/sun/jndi/ldap/LdapPoolTimeoutTest.java`?
> 
> This test has been failing intermittently in our CI for several years. 
> Detailed are noted in https://bugs.openjdk.org/browse/JDK-8287062. Most of 
> these failures are because the exception message, in an exception that was 
> raised, contains an unexpected value (apparently `null`). The test doesn't 
> propagate the unexpected exception, thus it's not clear why the exception 
> message is different than what the test expects. The commit in this PR 
> propagates the original exception if the message is unexpected. This should 
> help identify the underlying cause of the test failure, if/when it fails the 
> next time.
> 
> I have run this test with these changes and the test continues to pass.

test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java line 109:

> 107:             } catch (ExecutionException e) {
> 108:                 failedCount++;
> 109:                 System.err.println("test failure:");

Do you think giving each test failure a number or at least printing the 
`failedCount` might be beneficial for debugging? This way it would be easier to 
know if the error is happening exclusively on the first/ after the first/ last 
run. 
So the message in the `System.err` looked something like this:

Run 2 - failure 1 - error: 
<Error stack trace>

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24793#discussion_r2053852087

Reply via email to