[jboss-cvs] JBossAS SVN: r109607 - in branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/cluster: web/persistent and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 30 18:40:41 EST 2010


Author: rachmatowicz at jboss.com
Date: 2010-11-30 18:40:41 -0500 (Tue, 30 Nov 2010)
New Revision: 109607

Modified:
   branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/cluster/testutil/DBSetupDelegate.java
   branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/cluster/web/persistent/PersistentSessionTestUtil.java
   branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/cluster/web/persistent/PersistentStoreSetupDelegate.java
Log:
Fix URL generation in some persistent store test cases (JBAS-8540)

Modified: branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/cluster/testutil/DBSetupDelegate.java
===================================================================
--- branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/cluster/testutil/DBSetupDelegate.java	2010-11-30 23:38:50 UTC (rev 109606)
+++ branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/cluster/testutil/DBSetupDelegate.java	2010-11-30 23:40:41 UTC (rev 109607)
@@ -28,6 +28,7 @@
 import java.sql.Statement;
 
 import org.jboss.test.JBossTestServices;
+import org.jboss.test.JBossTestUtil;
 
 /** A TestSetup that starts hypersonic before the testcase with a tcp
  * listening port at 1701.
@@ -110,7 +111,8 @@
    public void tearDown() throws Exception
    {
       Class.forName("org.hsqldb.jdbcDriver");
-      String dbURL = "jdbc:hsqldb:hsql://" + address + ":" + port;
+      // JBAS-8540
+      String dbURL = "jdbc:hsqldb:hsql://" + JBossTestUtil.fixHostnameForURL(address) + ":" + port;
       Connection conn = DriverManager.getConnection(dbURL, "sa", "");
       Statement statement = conn.createStatement();      
       statement.executeQuery("SHUTDOWN COMPACT");      

Modified: branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/cluster/web/persistent/PersistentSessionTestUtil.java
===================================================================
--- branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/cluster/web/persistent/PersistentSessionTestUtil.java	2010-11-30 23:38:50 UTC (rev 109606)
+++ branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/cluster/web/persistent/PersistentSessionTestUtil.java	2010-11-30 23:40:41 UTC (rev 109607)
@@ -41,6 +41,8 @@
 import org.jboss.web.tomcat.service.session.persistent.DataSourcePersistentManager;
 import org.jboss.web.tomcat.service.session.persistent.RDBMSStoreBase;
 
+import org.jboss.test.JBossTestUtil ;
+
 /**
  * Utilities for session testing.
  * 
@@ -60,7 +62,8 @@
          {
             Driver driver = org.hsqldb.jdbcDriver.class.newInstance();
             String host = System.getProperty(DBSetupDelegate.DBADDRESS_PROPERTY, DBSetupDelegate.DEFAULT_ADDRESS);
-            String jdbcURL = "jdbc:hsqldb:hsql://" + host + ":" + DBSetupDelegate.DEFAULT_PORT;
+            // JBAS-8540
+            String jdbcURL = "jdbc:hsqldb:hsql://" + JBossTestUtil.fixHostnameForURL(host) + ":" + DBSetupDelegate.DEFAULT_PORT;
             datasource = new MockDataSource(driver, jdbcURL, "sa", null);
          }
          catch (InstantiationException e)

Modified: branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/cluster/web/persistent/PersistentStoreSetupDelegate.java
===================================================================
--- branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/cluster/web/persistent/PersistentStoreSetupDelegate.java	2010-11-30 23:38:50 UTC (rev 109606)
+++ branches/JBoss-AS-6.0.x-ipv6/testsuite/src/main/org/jboss/test/cluster/web/persistent/PersistentStoreSetupDelegate.java	2010-11-30 23:40:41 UTC (rev 109607)
@@ -4,6 +4,7 @@
 package org.jboss.test.cluster.web.persistent;
 
 import org.jboss.test.JBossTestServices;
+import org.jboss.test.JBossTestUtil;
 import org.jboss.test.cluster.testutil.DBSetupDelegate;
 import org.jboss.test.cluster.testutil.TestSetupDelegate;
 import org.jboss.web.tomcat.service.session.persistent.PersistentStore;
@@ -46,7 +47,8 @@
    {
       
       PersistentStoreTableSetup tableSetup = new PersistentStoreTableSetup();
-      tableSetup.setJdbcURL("jdbc:hsqldb:hsql://" + address + ":" + port);
+      // JBAS-8540
+      tableSetup.setJdbcURL("jdbc:hsqldb:hsql://" + JBossTestUtil.fixHostnameForURL(address) + ":" + port);
       tableSetup.start();
    }
 



More information about the jboss-cvs-commits mailing list