diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestRMFailover.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestRMFailover.java index a744714846bce..5091049010301 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestRMFailover.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/TestRMFailover.java @@ -216,7 +216,7 @@ public void testWebAppProxyInStandAloneMode() throws YarnException, WebAppProxyServer webAppProxyServer = new WebAppProxyServer(); try { - conf.set(YarnConfiguration.PROXY_ADDRESS, "0.0.0.0:9099"); + conf.set(YarnConfiguration.PROXY_ADDRESS, "localhost:9099"); cluster.init(conf); cluster.start(); getAdminService(0).transitionToActive(req); @@ -231,7 +231,7 @@ public void testWebAppProxyInStandAloneMode() throws YarnException, // send httpRequest with fakeApplicationId // expect to get "Not Found" response and 404 response code - URL wrongUrl = new URL("http://0.0.0.0:9099/proxy/" + fakeAppId); + URL wrongUrl = new URL("http://localhost:9099/proxy/" + fakeAppId); HttpURLConnection proxyConn = (HttpURLConnection) wrongUrl .openConnection(); @@ -258,7 +258,7 @@ public void testEmbeddedWebAppProxy() throws YarnException, // send httpRequest with fakeApplicationId // expect to get "Not Found" response and 404 response code - URL wrongUrl = new URL("http://0.0.0.0:18088/proxy/" + fakeAppId); + URL wrongUrl = new URL("http://localhost:18088/proxy/" + fakeAppId); HttpURLConnection proxyConn = (HttpURLConnection) wrongUrl .openConnection(); @@ -286,8 +286,8 @@ public void testRMWebAppRedirect() throws YarnException, cluster.init(conf); cluster.start(); getAdminService(0).transitionToActive(req); - String rm1Url = "http://0.0.0.0:18088"; - String rm2Url = "http://0.0.0.0:28088"; + String rm1Url = "http://localhost:18088"; + String rm2Url = "http://localhost:28088"; String redirectURL = getRedirectURL(rm2Url); // if uri is null, RMWebAppFilter will append a slash at the trail of the redirection url