HADOOP-15529. ContainerLaunch#testInvalidEnvVariableSubstitutionType is not 
supported in Windows. Contributed by Giovanni Matteo Fumarola.

(cherry picked from commit 6e756e8a620e4d6dc3192986679060c52063489b)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6a31dc99
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6a31dc99
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6a31dc99

Branch: refs/heads/branch-3.0
Commit: 6a31dc9927dfa3e7d63077c7f9aaaa2e09ff890b
Parents: 96e7b7e
Author: Inigo Goiri <inigo...@apache.org>
Authored: Tue Jun 12 10:24:34 2018 -0700
Committer: Inigo Goiri <inigo...@apache.org>
Committed: Tue Jun 12 10:25:36 2018 -0700

----------------------------------------------------------------------
 .../containermanager/launcher/TestContainerLaunch.java  | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6a31dc99/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/TestContainerLaunch.java
----------------------------------------------------------------------
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/TestContainerLaunch.java
 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/TestContainerLaunch.java
index 5923f8e..2a0a763 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/TestContainerLaunch.java
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/TestContainerLaunch.java
@@ -1726,7 +1726,11 @@ public class TestContainerLaunch extends 
BaseContainerManagerTest {
   public void testInvalidEnvVariableSubstitutionType1() throws IOException {
     Map<String, String> env = new HashMap<String, String>();
     // invalid env
-    env.put("testVar", "version${foo.version}");
+    String invalidEnv = "version${foo.version}";
+    if (Shell.WINDOWS) {
+      invalidEnv = "version%foo%<>^&|=:version%";
+    }
+    env.put("testVar", invalidEnv);
     validateShellExecutorForDifferentEnvs(env);
   }
 
@@ -1737,7 +1741,11 @@ public class TestContainerLaunch extends 
BaseContainerManagerTest {
   public void testInvalidEnvVariableSubstitutionType2() throws IOException {
     Map<String, String> env = new HashMap<String, String>();
     // invalid env
-    env.put("testPath", "/abc:/${foo.path}:/$bar");
+    String invalidEnv = "/abc:/${foo.path}:/$bar";
+    if (Shell.WINDOWS) {
+      invalidEnv = "/abc:/%foo%<>^&|=:path%:/%bar%";
+    }
+    env.put("testPath", invalidEnv);
     validateShellExecutorForDifferentEnvs(env);
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to