Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

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
Yuri Nesterenko committed Aug 1, 2022
1 parent 052091a commit 76d3692
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

0 comments on commit 76d3692

Please sign in to comment.