YARN-2899. Run TestDockerContainerExecutorWithMocks on Linux only. Contributed by Ming Ma.

This commit is contained in:
cnauroth 2015-02-13 21:58:50 -08:00
parent f2231cebcd
commit 6804d68901
2 changed files with 7 additions and 2 deletions

View File

@ -596,6 +596,9 @@ Release 2.7.0 - UNRELEASED
YARN-2847. Linux native container executor segfaults if default banned YARN-2847. Linux native container executor segfaults if default banned
user detected (Olaf Flebbe via jlowe) user detected (Olaf Flebbe via jlowe)
YARN-2899. Run TestDockerContainerExecutorWithMocks on Linux only.
(Ming Ma via cnauroth)
Release 2.6.0 - 2014-11-18 Release 2.6.0 - 2014-11-18
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -69,7 +69,7 @@ public class TestDockerContainerExecutorWithMocks {
@Before @Before
public void setup() { public void setup() {
assumeTrue(!Path.WINDOWS); assumeTrue(Shell.LINUX);
File f = new File("./src/test/resources/mock-container-executor"); File f = new File("./src/test/resources/mock-container-executor");
if(!FileUtil.canExecute(f)) { if(!FileUtil.canExecute(f)) {
FileUtil.setExecutable(f, true); FileUtil.setExecutable(f, true);
@ -101,7 +101,9 @@ public void setup() {
@After @After
public void tearDown() { public void tearDown() {
try { try {
lfs.delete(workDir, true); if (lfs != null) {
lfs.delete(workDir, true);
}
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }