Skip to content

Commit

Permalink
8287672: jtreg test com/sun/jndi/ldap/LdapPoolTimeoutTest.java fails …
Browse files Browse the repository at this point in the history
…intermittently in nightly run

Backport-of: 7e211d7daac32dca8f26f408d1a3b2c7805b5a2e
  • Loading branch information
GoeLin committed Jul 3, 2022
1 parent 9b73adb commit 6ecce29
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java
Expand Up @@ -49,6 +49,7 @@

import static jdk.test.lib.Utils.adjustTimeout;
import static org.testng.Assert.assertTrue;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.expectThrows;

public class LdapPoolTimeoutTest {
Expand Down Expand Up @@ -121,7 +122,9 @@ private static void attemptConnect(Hashtable<Object, Object> env) throws Excepti
String msg = e.getCause() == null ? e.getMessage() : e.getCause().getMessage();
System.err.println("MSG RTE: " + msg);
// assertCompletion may wrap a CommunicationException in an RTE
assertTrue(msg != null && msg.contains("Network is unreachable"));
assertNotNull(msg);
assertTrue(msg.contains("Network is unreachable")
|| msg.contains("No route to host"));
} catch (NamingException ex) {
String msg = ex.getCause() == null ? ex.getMessage() : ex.getCause().getMessage();
System.err.println("MSG: " + msg);
Expand Down

1 comment on commit 6ecce29

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.