From aad3958e50ab6235e80ce7a5da687dcfe2c116f9 Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Mon, 12 Feb 2018 09:27:43 -0600 Subject: [PATCH] YARN-7917. Fix failing test TestDockerContainerRuntime#testLaunchContainerWithDockerTokens. Contributed by Shane Kumpf (cherry picked from commit 3414fd1243c0b0dcbb9cea986af5f096300eba97) --- .../linux/runtime/TestDockerContainerRuntime.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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/linux/runtime/TestDockerContainerRuntime.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/TestDockerContainerRuntime.java index e9cf7652cda..4c53eb117c3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/TestDockerContainerRuntime.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/TestDockerContainerRuntime.java @@ -1775,7 +1775,7 @@ public class TestDockerContainerRuntime { List dockerCommands = Files .readAllLines(Paths.get(dockerCommandFile), Charset.forName("UTF-8")); - int expected = 15; + int expected = 16; int counter = 0; Assert.assertEquals(expected, dockerCommands.size()); Assert.assertEquals("[docker-command-execution]", @@ -1797,12 +1797,12 @@ public class TestDockerContainerRuntime { dockerCommands.get(counter++)); Assert.assertEquals(" name=container_id", dockerCommands.get(counter++)); Assert.assertEquals(" net=host", dockerCommands.get(counter++)); + Assert.assertEquals(" ro-mounts=/test_filecache_dir:/test_filecache_dir," + + "/test_user_filecache_dir:/test_user_filecache_dir", + dockerCommands.get(counter++)); Assert.assertEquals( - " rw-mounts=/test_container_local_dir:/test_container_local_dir," - + "/test_filecache_dir:/test_filecache_dir," - + "/test_container_work_dir:/test_container_work_dir," - + "/test_container_log_dir:/test_container_log_dir," - + "/test_user_local_dir:/test_user_local_dir", + " rw-mounts=/test_container_log_dir:/test_container_log_dir," + + "/test_application_local_dir:/test_application_local_dir", dockerCommands.get(counter++)); Assert.assertEquals(" user=" + uidGidPair, dockerCommands.get(counter++)); Assert.assertEquals(" workdir=/test_container_work_dir",