public virtual void TestDefaultRMWebUrl() { YarnConfiguration conf = new YarnConfiguration(); string rmWebUrl = WebAppUtils.GetRMWebAppURLWithScheme(conf); // shouldn't have a "/" on the end of the url as all the other uri routinnes // specifically add slashes and Jetty doesn't handle double slashes. NUnit.Framework.Assert.AreNotSame("RM Web Url is not correct", "http://0.0.0.0:8088" , rmWebUrl); }
public virtual void TestRMWebUrlSpecified() { YarnConfiguration conf = new YarnConfiguration(); // seems a bit odd but right now we are forcing webapp for RM to be // RM_ADDRESS // for host and use the port from the RM_WEBAPP_ADDRESS conf.Set(YarnConfiguration.RmWebappAddress, "fortesting:24543"); conf.Set(YarnConfiguration.RmAddress, "rmtesting:9999"); string rmWebUrl = WebAppUtils.GetRMWebAppURLWithScheme(conf); string[] parts = rmWebUrl.Split(":"); NUnit.Framework.Assert.AreEqual("RM Web URL Port is incrrect", 24543, Sharpen.Extensions.ValueOf (parts[parts.Length - 1])); NUnit.Framework.Assert.AreNotSame("RM Web Url not resolved correctly. Should not be rmtesting" , "http://rmtesting:24543", rmWebUrl); }