From 55ba22072194680563ae95adc8c05fcab706aa76 Mon Sep 17 00:00:00 2001 From: Subru Krishnan Date: Thu, 27 Oct 2016 15:11:12 -0700 Subject: [PATCH] YARN-3568. TestAMRMTokens should use some random port. (Takashi Ohnishi via Subru). (cherry picked from commit 79ae78dcbec183ab53b26de408b4517e5a151878) (cherry picked from commit 4274600b9527706259ec5df62a13a5a66adc3ff2) --- .../yarn/server/resourcemanager/security/TestAMRMTokens.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestAMRMTokens.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestAMRMTokens.java index 4488ad6b47f..bcf239dfad6 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestAMRMTokens.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestAMRMTokens.java @@ -113,6 +113,8 @@ public class TestAMRMTokens { DEFAULT_RM_AMRM_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS); conf.setLong(YarnConfiguration.RM_AM_EXPIRY_INTERVAL_MS, YarnConfiguration.DEFAULT_RM_AM_EXPIRY_INTERVAL_MS); + conf.set(YarnConfiguration.RM_SCHEDULER_ADDRESS, + "0.0.0.0:0"); MyContainerManager containerManager = new MyContainerManager(); final MockRMWithAMS rm = @@ -230,6 +232,8 @@ public class TestAMRMTokens { YarnConfiguration.RM_AMRM_TOKEN_MASTER_KEY_ROLLING_INTERVAL_SECS, rolling_interval_sec); conf.setLong(YarnConfiguration.RM_AM_EXPIRY_INTERVAL_MS, am_expire_ms); + conf.set(YarnConfiguration.RM_SCHEDULER_ADDRESS, + "0.0.0.0:0"); MyContainerManager containerManager = new MyContainerManager(); final MockRMWithAMS rm = new MockRMWithAMS(conf, containerManager);