HADOOP-17340. TestLdapGroupsMapping failing -string mismatch in exception validation. (#2427). Contributed by Steve Loughran.

This commit is contained in:
Steve Loughran 2020-11-07 04:13:24 +00:00 committed by Ayush Saxena
parent 92db25d64b
commit b807fa2b3b
1 changed files with 6 additions and 4 deletions

View File

@ -349,8 +349,9 @@ public class TestLdapGroupsMapping extends TestLdapGroupsMappingBase {
fail("The LDAP query should have timed out!");
} catch (NamingException ne) {
LOG.debug("Got the exception while LDAP querying: ", ne);
assertExceptionContains("LDAP response read timed out, timeout used:" +
connectionTimeoutMs + "ms", ne);
assertExceptionContains("LDAP response read timed out, timeout used",
ne);
assertExceptionContains("" + connectionTimeoutMs, ne);
assertFalse(ne.getMessage().contains("remaining name"));
} finally {
finLatch.countDown();
@ -404,8 +405,9 @@ public class TestLdapGroupsMapping extends TestLdapGroupsMappingBase {
fail("The LDAP query should have timed out!");
} catch (NamingException ne) {
LOG.debug("Got the exception while LDAP querying: ", ne);
assertExceptionContains("LDAP response read timed out, timeout used:" +
readTimeoutMs + "ms", ne);
assertExceptionContains("LDAP response read timed out, timeout used",
ne);
assertExceptionContains(""+ readTimeoutMs, ne);
assertExceptionContains("remaining name", ne);
} finally {
finLatch.countDown();