8317307: test/jdk/com/sun/jndi/ldap/LdapPoolTimeoutTest.java fails with ConnectException: Connection timed out: no further information

Backport-of: b9b82631bf
This commit is contained in:
Matthias Baesken
2023-12-20 11:32:33 +00:00
committed by Vitaly Provodin
parent eb838a10c0
commit 3cd21b3a06

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -124,7 +124,7 @@ public class LdapPoolTimeoutTest {
// assertCompletion may wrap a CommunicationException in an RTE
assertNotNull(msg);
assertTrue(msg.contains("Network is unreachable")
|| msg.contains("No route to host"));
|| msg.contains("No route to host") || msg.contains("Connection timed out"));
} catch (NamingException ex) {
String msg = ex.getCause() == null ? ex.getMessage() : ex.getCause().getMessage();
System.err.println("MSG: " + msg);