[jboss-cvs] JBossAS SVN: r108866 - branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/test.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Oct 24 20:35:27 EDT 2010


Author: rachmatowicz at jboss.com
Date: 2010-10-24 20:35:27 -0400 (Sun, 24 Oct 2010)
New Revision: 108866

Modified:
   branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/test/WebIntegrationUnitTestCase.java
Log:
Fix URL generation in WebIntegrationUnitTestCase (JBAS-8540)

Modified: branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/test/WebIntegrationUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/test/WebIntegrationUnitTestCase.java	2010-10-25 00:31:30 UTC (rev 108865)
+++ branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/test/WebIntegrationUnitTestCase.java	2010-10-25 00:35:27 UTC (rev 108866)
@@ -227,7 +227,7 @@
       URL url = new URL(baseURL+"jbosstest/restricted/SecureServlet");
       getLog().info("Accessing SecureServlet with valid login");
       HttpUtils.accessURL(url);
-      String baseURL2 = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + '/';
+      String baseURL2 = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + '/';
       URL url2 = new URL(baseURL2+"jbosstest/restricted/UnsecureEJBServlet");
       getLog().info("Accessing SecureServlet with no login");
       HttpUtils.accessURL(url2, REALM, HttpURLConnection.HTTP_UNAUTHORIZED);
@@ -236,7 +236,7 @@
     */
    public void testSecureServletWithBadPass() throws Exception
    {
-      String baseURL = "http://jduke:badpass@" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + '/';
+      String baseURL = "http://jduke:badpass@" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + '/';
       URL url = new URL(baseURL+"jbosstest/restricted/SecureServlet");
       HttpUtils.accessURL(url, REALM, HttpURLConnection.HTTP_UNAUTHORIZED);
    }
@@ -244,7 +244,7 @@
     */
    public void testSecureServletWithNoLogin() throws Exception
    {
-      String baseURL = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + '/';
+      String baseURL = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + '/';
       URL url = new URL(baseURL+"jbosstest/restricted/SecureServlet");
       HttpUtils.accessURL(url, REALM, HttpURLConnection.HTTP_UNAUTHORIZED);
    }
@@ -252,7 +252,7 @@
     */
    public void testNotJbosstest() throws Exception
    {
-      String baseURL = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + '/';
+      String baseURL = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + '/';
       URL url = new URL(baseURL+"jbosstest-not/unrestricted/SecureServlet");
       HttpUtils.accessURL(url, REALM, HttpURLConnection.HTTP_OK);
    }
@@ -351,7 +351,7 @@
       try 
       {
          deploy("jbosstest-web2.ear");
-         String baseURL = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + '/';
+         String baseURL = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + '/';
          URL url = new URL(baseURL+"jbosstest-not2/unrestricted/SecureServlet");
          HttpUtils.accessURL(url, REALM, HttpURLConnection.HTTP_OK);
       }
@@ -383,7 +383,7 @@
       try 
       {
          deploy("good-web.war");
-         String baseURL = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + '/';
+         String baseURL = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + '/';
          URL url = new URL(baseURL+"redeploy/index.html");
          HttpUtils.accessURL(url, REALM, HttpURLConnection.HTTP_OK);
       }
@@ -401,7 +401,7 @@
       deploy("manifest-web.ear");
       try
       {
-         String baseURL = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + '/';
+         String baseURL = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + '/';
          URL url = new URL(baseURL+"manifest/classpath.jsp");
          HttpMethodBase request = HttpUtils.accessURL(url);
          Header errors = request.getResponseHeader("X-Exception");
@@ -432,7 +432,7 @@
       try 
       {
          deploy("jbosstest-good.ear");
-         String baseURL = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + '/';
+         String baseURL = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + '/';
          URL url = new URL(baseURL+"redeploy/index.html");
          HttpUtils.accessURL(url, REALM, HttpURLConnection.HTTP_OK);
       }
@@ -455,7 +455,7 @@
       deploy("class-loading.war");
       try
       {
-         String baseURL = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + '/';
+         String baseURL = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + '/';
          // Load a log4j class
          URL url = new URL(baseURL+"class-loading/ClasspathServlet2?class=org.apache.log4j.net.SocketAppender");
          HttpMethodBase request = HttpUtils.accessURL(url, REALM, HttpURLConnection.HTTP_OK);
@@ -478,7 +478,7 @@
       deploy("servlet-classes.war");
       try
       {
-         String baseURL = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + '/';
+         String baseURL = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + '/';
          // Load a servlet class
          URL url = new URL(baseURL+"servlet-classes/ClasspathServlet2?class=javax.servlet.http.HttpServletResponse");
          HttpMethodBase request = HttpUtils.accessURL(url, REALM, HttpURLConnection.HTTP_OK);



More information about the jboss-cvs-commits mailing list