Skip to content

Commit ae7b00a

Browse files
HADOOP-17340. TestLdapGroupsMapping failing -string mismatch in exception validation. (#2427). Contributed by Steve Loughran.
1 parent 6eacaff commit ae7b00a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestLdapGroupsMapping.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,9 @@ public void run() {
389389
fail("The LDAP query should have timed out!");
390390
} catch (NamingException ne) {
391391
LOG.debug("Got the exception while LDAP querying: ", ne);
392-
assertExceptionContains("LDAP response read timed out, timeout used:" +
393-
connectionTimeoutMs + "ms", ne);
392+
assertExceptionContains("LDAP response read timed out, timeout used",
393+
ne);
394+
assertExceptionContains("" + connectionTimeoutMs, ne);
394395
assertFalse(ne.getMessage().contains("remaining name"));
395396
} finally {
396397
finLatch.countDown();
@@ -444,8 +445,9 @@ public void run() {
444445
fail("The LDAP query should have timed out!");
445446
} catch (NamingException ne) {
446447
LOG.debug("Got the exception while LDAP querying: ", ne);
447-
assertExceptionContains("LDAP response read timed out, timeout used:" +
448-
readTimeoutMs + "ms", ne);
448+
assertExceptionContains("LDAP response read timed out, timeout used",
449+
ne);
450+
assertExceptionContains(""+ readTimeoutMs, ne);
449451
assertExceptionContains("remaining name", ne);
450452
} finally {
451453
finLatch.countDown();

0 commit comments

Comments
 (0)