diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 8e67b138bf..c72f9f7f31 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -736,6 +736,9 @@ Release 0.23.0 - Unreleased HADOOP-7755. Detect MapReduce PreCommit Trunk builds silently failing when running test-patch.sh. (Jonathan Eagles via tomwhite) + HADOOP-7744. Ensure failed tests exit with proper error code. (Jonathan + Eagles via acmurthy) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/CoreTestDriver.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/CoreTestDriver.java index 06590c9cdf..a01e751b2e 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/CoreTestDriver.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/CoreTestDriver.java @@ -50,11 +50,14 @@ public CoreTestDriver(ProgramDriver pgd) { } public void run(String argv[]) { + int exitCode = -1; try { - pgd.driver(argv); + exitCode = pgd.driver(argv); } catch(Throwable e) { e.printStackTrace(); } + + System.exit(exitCode); } public static void main(String argv[]){