diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 2f62b2e25e..bba4ceded5 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -81,6 +81,8 @@ Release 2.4.1 - UNRELEASED YARN-1837. Fixed TestMoveApplication#testMoveRejectedByScheduler failure. (Hong Zhiguo via jianhe) + YARN-1905. TestProcfsBasedProcessTree must only run on Linux. (cnauroth) + Release 2.4.0 - 2014-04-07 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java index 46da9b1eb4..771925574c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/java/org/apache/hadoop/yarn/util/TestProcfsBasedProcessTree.java @@ -20,6 +20,7 @@ package org.apache.hadoop.yarn.util; import static org.apache.hadoop.yarn.util.ProcfsBasedProcessTree.KB_TO_BYTES; import static org.junit.Assert.fail; +import static org.junit.Assume.assumeTrue; import java.io.BufferedReader; import java.io.BufferedWriter; @@ -109,19 +110,13 @@ public class TestProcfsBasedProcessTree { @Before public void setup() throws IOException { + assumeTrue(Shell.LINUX); FileContext.getLocalFSFileContext().delete( new Path(TEST_ROOT_DIR.getAbsolutePath()), true); } @Test(timeout = 30000) public void testProcessTree() throws Exception { - - if (!Shell.LINUX) { - System.out - .println("ProcfsBasedProcessTree is not available on this system. Not testing"); - return; - - } try { Assert.assertTrue(ProcfsBasedProcessTree.isAvailable()); } catch (Exception e) {