[jboss-cvs] JBossAS SVN: r109609 - in branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test: profileservice/test and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 30 18:43:39 EST 2010


Author: rachmatowicz at jboss.com
Date: 2010-11-30 18:43:39 -0500 (Tue, 30 Nov 2010)
New Revision: 109609

Modified:
   branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/jmx/test/SecureJMXInvokerUnitTestCase.java
   branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/profileservice/test/JMXMappingUnitTestCase.java
   branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/web/test/ssl/SSLUnitTestCase.java
Log:
Fix URL generation in various test cases (JBAS-8540)

Modified: branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/jmx/test/SecureJMXInvokerUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/jmx/test/SecureJMXInvokerUnitTestCase.java	2010-11-30 23:42:31 UTC (rev 109608)
+++ branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/jmx/test/SecureJMXInvokerUnitTestCase.java	2010-11-30 23:43:39 UTC (rev 109609)
@@ -76,8 +76,8 @@
    {
       return new ObjectName("jboss.test:service=InvokerTest,secured=true");
    }
-
-   static final String TARGET_SERVER = System.getProperty("jbosstest.server.host", "localhost");
+   // JBAS-8540
+   static final String TARGET_SERVER_FOR_URL = System.getProperty("jbosstest.server.host.url", "localhost");
    private MBeanServerConnection getJMXServer() throws Exception
    {
       HashMap env = new HashMap();
@@ -92,7 +92,7 @@
          env.put(JMXConnector.CREDENTIALS, creds);
       }
 
-      JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"+TARGET_SERVER+":1090/jmxrmi");
+      JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"+TARGET_SERVER_FOR_URL+":1090/jmxrmi");
       JMXConnector jmxc = JMXConnectorFactory.connect(url, env);
       MBeanServerConnection adaptor = jmxc.getMBeanServerConnection();
       return adaptor;

Modified: branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/profileservice/test/JMXMappingUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/profileservice/test/JMXMappingUnitTestCase.java	2010-11-30 23:42:31 UTC (rev 109608)
+++ branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/profileservice/test/JMXMappingUnitTestCase.java	2010-11-30 23:43:39 UTC (rev 109609)
@@ -145,7 +145,8 @@
 
             // Statistic
             int requests = (Integer)((SimpleValue)comp.getProperty("requestCount").getValue()).getValue();
-            new URL("http://" + getServerHost() + ":8080/jmx-console/HtmlAdaptor").openStream().close();
+            // JBAS-8540
+            new URL("http://" + getServerHostForURL() + ":8080/jmx-console/HtmlAdaptor").openStream().close();
             assertEquals(requests + 1, ((SimpleValue)comp.getProperty("requestCount").getValue()).getValue());
             return;
          }
@@ -201,7 +202,8 @@
          {
             // Statistic
             int requests = (Integer)((SimpleValue)comp.getProperty("requestCount").getValue()).getValue();
-            new URL("http://" + getServerHost() + ":8080/").openStream().close();
+            // JBAS-8540
+            new URL("http://" + getServerHostForURL() + ":8080/").openStream().close();
             assertEquals(requests + 1, ((SimpleValue)comp.getProperty("requestCount").getValue()).getValue());
             return;
          }

Modified: branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/web/test/ssl/SSLUnitTestCase.java
===================================================================
--- branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/web/test/ssl/SSLUnitTestCase.java	2010-11-30 23:42:31 UTC (rev 109608)
+++ branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/web/test/ssl/SSLUnitTestCase.java	2010-11-30 23:43:39 UTC (rev 109609)
@@ -49,8 +49,9 @@
    protected void setUp() throws Exception
    {
       super.setUp();
-      baseHttpNoAuth = "http://" + getServerHost() + ":" + Integer.getInteger("web.port", 8080) + "/"; 
-      baseHttpsNoAuth = "https://" + getServerHost() + ":" + Integer.getInteger("secureweb.port", 8443) + "/"; 
+      // JBAS-8540
+      baseHttpNoAuth = "http://" + getServerHostForURL() + ":" + Integer.getInteger("web.port", 8080) + "/"; 
+      baseHttpsNoAuth = "https://" + getServerHostForURL() + ":" + Integer.getInteger("secureweb.port", 8443) + "/"; 
    }
 
    /** Test that access of the transport constrained redirects to the ssl connector
@@ -72,7 +73,8 @@
       log.info("+++ testHttpRedirectSecurityDomain");
       int port = Integer.getInteger("web.port", 8080).intValue();
       port += 1000;
-      String httpNoAuth = "http://" + getServerHost() + ":" + port + "/";
+      // JBAS-8540
+      String httpNoAuth = "http://" + getServerHostForURL() + ":" + port + "/";
       doHttpRedirect(httpNoAuth);
    }
 
@@ -91,7 +93,7 @@
       log.info("+++ testHttps");
       int port = Integer.getInteger("secureweb.port", 8443).intValue();
       port += 1000;
-      String httpsNoAuth = "https://" + getServerHost() + ":" + port + "/";
+      String httpsNoAuth = "https://" + getServerHostForURL() + ":" + port + "/";
       doHttps(httpsNoAuth);
    }
    
@@ -104,7 +106,7 @@
       log.info("+++ testHttps");
       int port = Integer.getInteger("secureweb.port", 8443).intValue();
       port += 1500;
-      String httpsNoAuth = "https://" + getServerHost() + ":" + port + "/";
+      String httpsNoAuth = "https://" + getServerHostForURL() + ":" + port + "/";
       doHttps(httpsNoAuth);
    }
    



More information about the jboss-cvs-commits mailing list