[jboss-cvs] JBossAS SVN: r108853 - in branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test: ejb3/jbas7526/unit and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Oct 23 15:31:03 EDT 2010


Author: rachmatowicz at jboss.com
Date: 2010-10-23 15:31:03 -0400 (Sat, 23 Oct 2010)
New Revision: 108853

Modified:
   branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/classloader/test/ScopingUnitTestCase.java
   branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/ejb3/jbas7526/unit/ServletAndEJBUnitTestCase.java
   branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/jmx/test/JMXConnectorUnitTestCase.java
   branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/jpa/test/AbstractWebJPATest.java
   branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/util/web/HttpUtils.java
   branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/security/GenericHeaderAuthUnitTestCase.java
   branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/test/FormAuthUnitTestCase.java
   branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/test/RemoteClassloadingServiceUnitTestCase.java
Log:
Fix URL generation in a number of test cases (JBAS-8540)

Modified: branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/classloader/test/ScopingUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/classloader/test/ScopingUnitTestCase.java	2010-10-23 17:16:07 UTC (rev 108852)
+++ branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/classloader/test/ScopingUnitTestCase.java	2010-10-23 19:31:03 UTC (rev 108853)
@@ -116,14 +116,14 @@
       try
       {
          deploy("log4j113.war");
-         URL log4jServletURL = new URL("http://" + getServerHost() + ":8080/log4j113/Log4jServlet/");
+         URL log4jServletURL = new URL("http://" + getServerHostForURL() + ":8080/log4j113/Log4jServlet/");
          InputStream reply = (InputStream) log4jServletURL.getContent();
-         getLog().debug("Accessed http://" + getServerHost() + ":8080/log4j113/Log4jServlet/");
+         getLog().debug("Accessed http://" + getServerHostForURL() + ":8080/log4j113/Log4jServlet/");
          logReply(reply);
 
-         URL encServletURL = new URL("http://" + getServerHost() + ":8080/log4j113/ENCServlet/");
+         URL encServletURL = new URL("http://" + getServerHostForURL() + ":8080/log4j113/ENCServlet/");
          reply = (InputStream) encServletURL.getContent();
-         getLog().debug("Accessed http://" + getServerHost() + ":8080/log4j113/ENCServlet/");
+         getLog().debug("Accessed http://" + getServerHostForURL() + ":8080/log4j113/ENCServlet/");
          logReply(reply);
       }
       catch(Exception e)
@@ -146,9 +146,9 @@
       try
       {
          deploy("common-logging.war");
-         URL log4jServletURL = new URL("http://" + getServerHost() + ":8080/common-logging/Log4jServlet/");
+         URL log4jServletURL = new URL("http://" + getServerHostForURL() + ":8080/common-logging/Log4jServlet/");
          InputStream reply = (InputStream) log4jServletURL.getContent();
-         getLog().debug("Accessed http://" + getServerHost() + ":8080/common-logging/Log4jServlet/");
+         getLog().debug("Accessed http://" + getServerHostForURL() + ":8080/common-logging/Log4jServlet/");
          logReply(reply);
       }
       catch(Exception e)
@@ -173,9 +173,9 @@
       try
       {
          deploy("oldxerces.war");
-         URL servletURL = new URL("http://" + getServerHost() + ":8080/oldxerces/");
+         URL servletURL = new URL("http://" + getServerHostForURL() + ":8080/oldxerces/");
          InputStream reply = (InputStream) servletURL.getContent();
-         getLog().debug("Accessed http://" + getServerHost() + ":8080/oldxerces/");
+         getLog().debug("Accessed http://" + getServerHostForURL() + ":8080/oldxerces/");
          logReply(reply);
       }
       catch(Exception e)
@@ -332,7 +332,7 @@
       {
          deploy("shared-jndi1.sar");
          deploy("shared-jndi2.war");
-         URL servletURL = new URL("http://" + getServerHost() + ":8080/shared-jndi2/LookupServlet");
+         URL servletURL = new URL("http://" + getServerHostForURL() + ":8080/shared-jndi2/LookupServlet");
          InputStream reply = (InputStream) servletURL.getContent();
          getLog().debug("Accessed: "+servletURL);
          logReply(reply);

Modified: branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/ejb3/jbas7526/unit/ServletAndEJBUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/ejb3/jbas7526/unit/ServletAndEJBUnitTestCase.java	2010-10-23 17:16:07 UTC (rev 108852)
+++ branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/ejb3/jbas7526/unit/ServletAndEJBUnitTestCase.java	2010-10-23 19:31:03 UTC (rev 108853)
@@ -38,7 +38,8 @@
  */
 public class ServletAndEJBUnitTestCase extends JBossTestCase
 {
-   private String baseURL = "http://" + System.getProperty("jbosstest.server.host", "localhost") + ":" + Integer.getInteger("web.port", 8080) + "/jbas7526/calculator";
+	// JBAS-8540
+   private String baseURL = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + "/jbas7526/calculator";
    
    public ServletAndEJBUnitTestCase(String name)
    {

Modified: branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/jmx/test/JMXConnectorUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/jmx/test/JMXConnectorUnitTestCase.java	2010-10-23 17:16:07 UTC (rev 108852)
+++ branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/jmx/test/JMXConnectorUnitTestCase.java	2010-10-23 19:31:03 UTC (rev 108853)
@@ -79,7 +79,8 @@
    public void setUp() throws Exception
    {
       super.setUp();
-      String surl = "service:jmx:rmi://" + getServerHost() + "/jndi/rmi://" + getServerHost() + ":1090/jmxrmi";
+      // JBAS-8540
+      String surl = "service:jmx:rmi://" + getServerHostForURL() + "/jndi/rmi://" + getServerHostForURL() + ":1090/jmxrmi";
       log.info("setup for JMXServiceURL = " + surl);
       JMXServiceURL url = new JMXServiceURL(surl);
       connector = JMXConnectorFactory.connect(url);

Modified: branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/jpa/test/AbstractWebJPATest.java
===================================================================
--- branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/jpa/test/AbstractWebJPATest.java	2010-10-23 17:16:07 UTC (rev 108852)
+++ branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/jpa/test/AbstractWebJPATest.java	2010-10-23 19:31:03 UTC (rev 108853)
@@ -36,7 +36,7 @@
  */
 public abstract class AbstractWebJPATest extends JBossTestCase
 {
-   private String baseURL = "http://" + System.getProperty("jbosstest.server.host", "localhost") + ":" + Integer.getInteger("web.port", 8080) + "/jpa-test/Test?mode=";
+   private String baseURL = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + "/jpa-test/Test?mode=";
 
    public AbstractWebJPATest(String name)
    {

Modified: branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/util/web/HttpUtils.java
===================================================================
--- branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/util/web/HttpUtils.java	2010-10-23 17:16:07 UTC (rev 108852)
+++ branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/util/web/HttpUtils.java	2010-10-23 19:31:03 UTC (rev 108853)
@@ -59,6 +59,7 @@
    // JBAS-8540
    private static String getServerHost() {
 	   String hostName = System.getProperty("jbosstest.server.host", "localhost") ;
+	   System.out.println("HttpUtils: using hostname = " + hostName) ;
 	   return hostName;
    }
    

Modified: branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/security/GenericHeaderAuthUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/security/GenericHeaderAuthUnitTestCase.java	2010-10-23 17:16:07 UTC (rev 108852)
+++ branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/security/GenericHeaderAuthUnitTestCase.java	2010-10-23 19:31:03 UTC (rev 108853)
@@ -84,7 +84,8 @@
    protected void setUp() throws Exception
    {
       super.setUp();
-      this.testAppBaseURL = "http://" + super.getServerHost() + ":" + Integer.getInteger("web.port", 8080)
+      // JBAS-8540
+      this.testAppBaseURL = "http://" + super.getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080)
             + "/generic-header-auth/";
    }
 

Modified: branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/test/FormAuthUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/test/FormAuthUnitTestCase.java	2010-10-23 17:16:07 UTC (rev 108852)
+++ branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/test/FormAuthUnitTestCase.java	2010-10-23 19:31:03 UTC (rev 108853)
@@ -58,7 +58,8 @@
    protected void setUp() throws Exception
    {
       super.setUp();
-      baseURLNoAuth = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + "/"; 
+      // JBAS-8540
+      baseURLNoAuth = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + "/"; 
    }
 
    /** Test form authentication of a secured servlet

Modified: branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/test/RemoteClassloadingServiceUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/test/RemoteClassloadingServiceUnitTestCase.java	2010-10-23 17:16:07 UTC (rev 108852)
+++ branches/JBoss-AS-6.0.x_ipv6/testsuite/src/main/org/jboss/test/web/test/RemoteClassloadingServiceUnitTestCase.java	2010-10-23 19:31:03 UTC (rev 108853)
@@ -37,7 +37,8 @@
  */
 public class RemoteClassloadingServiceUnitTestCase extends JBossTestCase
 {
-   static final String baseURL = "http://" + System.getProperty("jbosstest.server.host", "localhost") + ":8083/";
+	//JBAS-8540)
+   static final String baseURL = "http://" + getServerHostForURL() + ":8083/";
    
    public RemoteClassloadingServiceUnitTestCase(String name)
    {



More information about the jboss-cvs-commits mailing list