HADOOP-10068. Improve log4j regex in testFindContainingJar. Contributed by Robert Rati.

This commit is contained in:
Haohui Mai 2015-11-22 18:29:03 -08:00
parent 1d175f0f3f
commit afac7a2640
2 changed files with 6 additions and 3 deletions

View File

@ -830,6 +830,9 @@ Release 2.8.0 - UNRELEASED
HADOOP-12098. Remove redundant test dependencies in Hadoop Archives.
(Varun Saxena via wheat9)
HADOOP-10068. Improve log4j regex in testFindContainingJar.
(Robert Rati via wheat9)
Release 2.7.3 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -32,9 +32,9 @@ public class TestClassUtil {
Assert.assertNotNull("Containing jar not found for Logger",
containingJar);
File jarFile = new File(containingJar);
Assert.assertTrue("Containing jar does not exist on file system",
Assert.assertTrue("Containing jar does not exist on file system ",
jarFile.exists());
Assert.assertTrue("Incorrect jar file" + containingJar,
jarFile.getName().matches("log4j.+[.]jar"));
Assert.assertTrue("Incorrect jar file " + containingJar,
jarFile.getName().matches("log4j.*[.]jar"));
}
}