From 6804d689019e4d2dfb2b35fd82f775a13e85960c Mon Sep 17 00:00:00 2001 From: cnauroth Date: Fri, 13 Feb 2015 21:58:50 -0800 Subject: [PATCH] YARN-2899. Run TestDockerContainerExecutorWithMocks on Linux only. Contributed by Ming Ma. --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../nodemanager/TestDockerContainerExecutorWithMocks.java | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 1644268ad7e..e9a7c588d54 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -596,6 +596,9 @@ Release 2.7.0 - UNRELEASED YARN-2847. Linux native container executor segfaults if default banned user detected (Olaf Flebbe via jlowe) + YARN-2899. Run TestDockerContainerExecutorWithMocks on Linux only. + (Ming Ma via cnauroth) + Release 2.6.0 - 2014-11-18 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestDockerContainerExecutorWithMocks.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestDockerContainerExecutorWithMocks.java index fa8bfaf8dc6..3584fedde43 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestDockerContainerExecutorWithMocks.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestDockerContainerExecutorWithMocks.java @@ -69,7 +69,7 @@ public class TestDockerContainerExecutorWithMocks { @Before public void setup() { - assumeTrue(!Path.WINDOWS); + assumeTrue(Shell.LINUX); File f = new File("./src/test/resources/mock-container-executor"); if(!FileUtil.canExecute(f)) { FileUtil.setExecutable(f, true); @@ -101,7 +101,9 @@ public class TestDockerContainerExecutorWithMocks { @After public void tearDown() { try { - lfs.delete(workDir, true); + if (lfs != null) { + lfs.delete(workDir, true); + } } catch (IOException e) { throw new RuntimeException(e); }