Index: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestLinuxContainerExecutorWithMocks.java =================================================================== --- hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestLinuxContainerExecutorWithMocks.java (revision 1502048) +++ hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestLinuxContainerExecutorWithMocks.java (working copy) @@ -40,6 +40,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileUtil; import org.apache.hadoop.fs.Path; +import org.apache.hadoop.util.Shell; import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.api.records.ContainerLaunchContext; @@ -99,6 +100,7 @@ @Test public void testContainerLaunch() throws IOException { + org.junit.Assume.assumeTrue(!Shell.WINDOWS); String appSubmitter = "nobody"; String cmd = String.valueOf( LinuxContainerExecutor.Commands.LAUNCH_CONTAINER.getValue()); @@ -136,7 +138,7 @@ @Test (timeout = 5000) public void testContainerLaunchWithPriority() throws IOException { - + org.junit.Assume.assumeTrue(!Shell.WINDOWS); // set the scheduler priority to make sure still works with nice -n prio File f = new File("./src/test/resources/mock-container-executor"); if (!FileUtil.canExecute(f)) { @@ -160,6 +162,7 @@ @Test (timeout = 5000) public void testLaunchCommandWithoutPriority() throws IOException { + org.junit.Assume.assumeTrue(!Shell.WINDOWS); // make sure the command doesn't contain the nice -n since priority // not specified List command = new ArrayList(); @@ -170,7 +173,7 @@ @Test (timeout = 5000) public void testStartLocalizer() throws IOException { - + org.junit.Assume.assumeTrue(!Shell.WINDOWS); InetSocketAddress address = InetSocketAddress.createUnresolved("localhost", 8040); Path nmPrivateCTokensPath= new Path("file:///bin/nmPrivateCTokensPath"); @@ -200,7 +203,7 @@ @Test public void testContainerLaunchError() throws IOException { - + org.junit.Assume.assumeTrue(!Shell.WINDOWS); // reinitialize executer File f = new File("./src/test/resources/mock-container-executer-with-error"); if (!FileUtil.canExecute(f)) { @@ -254,7 +257,7 @@ @Test public void testInit() throws Exception { - + org.junit.Assume.assumeTrue(!Shell.WINDOWS); mockExec.init(); assertEquals(Arrays.asList("--checksetup"), readMockParams()); @@ -263,6 +266,7 @@ @Test public void testContainerKill() throws IOException { + org.junit.Assume.assumeTrue(!Shell.WINDOWS); String appSubmitter = "nobody"; String cmd = String.valueOf( LinuxContainerExecutor.Commands.SIGNAL_CONTAINER.getValue()); @@ -276,6 +280,7 @@ @Test public void testDeleteAsUser() throws IOException { + org.junit.Assume.assumeTrue(!Shell.WINDOWS); String appSubmitter = "nobody"; String cmd = String.valueOf( LinuxContainerExecutor.Commands.DELETE_AS_USER.getValue());