YARN-1905. TestProcfsBasedProcessTree must only run on Linux. Contributed by Chris Nauroth.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1585376 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris Nauroth 2014-04-07 03:04:09 +00:00
parent 05da90ee2f
commit 4eacde67f8
2 changed files with 4 additions and 7 deletions

View File

@ -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

View File

@ -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) {