diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 1eb0807404..b710400c04 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -1703,6 +1703,9 @@ Release 0.23.0 - Unreleased MAPREDUCE-3212. Fix usage/help message for bin/yarn. (Bhallamudi Venkata Siva Kamesh via acmurthy) + MAPREDUCE-3179. Ensure failed tests exit with right error code. (Jonathan + Eagles via acmurthy) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/test/MapredTestDriver.java b/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/test/MapredTestDriver.java index 26747cd5f2..4ab14adba1 100644 --- a/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/test/MapredTestDriver.java +++ b/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/test/MapredTestDriver.java @@ -107,11 +107,13 @@ public MapredTestDriver(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[]){