[jboss-cvs] JBossAS SVN: r97310 - in branches/JBPAPP_4_2_0_GA_CP_IPV6: ejb3/src/test/org/jboss/ejb3/test and 8 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Dec 2 12:24:57 EST 2009
Author: rachmatowicz at jboss.com
Date: 2009-12-02 12:24:55 -0500 (Wed, 02 Dec 2009)
New Revision: 97310
Modified:
branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/build-test.xml
branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/DBSetup.java
branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/clusteredentity/unit/BulkOperationsUnitTestCase.java
branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/dd/web/util/HttpUtils.java
branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/jaccpropagation/unit/HttpUtils.java
branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/jsp/unit/HttpUtils.java
branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/servlet/unit/HttpUtils.java
branches/JBPAPP_4_2_0_GA_CP_IPV6/testsuite/build.xml
branches/JBPAPP_4_2_0_GA_CP_IPV6/testsuite/imports/server-config.xml
branches/JBPAPP_4_2_0_GA_CP_IPV6/testsuite/src/main/org/jboss/test/testbeancluster/test/DBSetup.java
Log:
Fixes for EJB3 testsuite operation under IPv6 (JBPAPP-2997).
Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/build-test.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/build-test.xml 2009-12-02 17:04:08 UTC (rev 97309)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/build-test.xml 2009-12-02 17:24:55 UTC (rev 97310)
@@ -87,14 +87,23 @@
<!-- Cluster node defaults -->
<property name="node0" value="localhost" />
- <property name="node0.http.url" value="http://${node0}:8080" />
- <property name="node0.jndi.url" value="jnp://${node0}:1099" />
- <property name="node0.jndi.port1.url" value="jnp://${node0}:1199" />
- <property name="node0.http.port1.url" value="http://${node0}:8180" />
+ <!-- node0.url is a hostname or IP literal suitable for embedding in URLs -->
+ <condition property="node0.url" value="[${node0}]" else="${node0}">
+ <contains string="${node0}" substring=":"/>
+ </condition>
+ <property name="node0.http.url" value="http://${node0.url}:8080" />
+ <property name="node0.jndi.url" value="jnp://${node0.url}:1099" />
+ <property name="node0.jndi.port1.url" value="jnp://${node0.url}:1199" />
+ <property name="node0.http.port1.url" value="http://${node0.url}:8180" />
<property name="node0.jgroups.bind_addr" value="${node0}" />
+
<property name="node1" value="${hostname}" />
- <property name="node1.http.url" value="http://${node1}:8080" />
- <property name="node1.jndi.url" value="jnp://${node1}:1099" />
+ <!-- node0.url is a hostname or IP literal suitable for embedding in URLs -->
+ <condition property="node1.url" value="[${node1}]" else="${node1}">
+ <contains string="${node1}" substring=":"/>
+ </condition>
+ <property name="node1.http.url" value="http://${node1.url}:8080" />
+ <property name="node1.jndi.url" value="jnp://${node1.url}:1099" />
<property name="node1.jgroups.bind_addr" value="${node1}" />
@@ -115,11 +124,12 @@
<macrodef name="wait-on-host">
<attribute name="seconds" default="${jboss.startup.timeout}"/>
<attribute name="host" default="${node0}"/>
+ <attribute name="hostforurl" default="${node0.url}"/>
<sequential>
<echo>Waiting for @{host} to start (max wait @{seconds} seconds)...</echo>
<waitfor maxwait="@{seconds}" maxwaitunit="second"
checkevery="5" checkeveryunit="second" timeoutproperty="startup.timeout">
- <http url="http://@{host}:8080/"/>
+ <http url="http://@{hostforurl}:8080/"/>
</waitfor>
<fail message="Timeout waiting for nodes to start" if="startup.timeout"/>
</sequential>
@@ -4005,13 +4015,15 @@
<sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/>
<sysproperty key="java.security.auth.login.config" value="${resources}/test/security/auth.conf"/>
<sysproperty key="jbosstest.server.host" value="${node0}"/>
+ <sysproperty key="jbosstest.server.host.url" value="${node0.url}"/>
-
<!-- properties needed for clustering -->
<sysproperty key="jbosstest.cluster.node0" value="${node0}"/>
+ <sysproperty key="jbosstest.cluster.node0.url" value="${node0.url}"/>
<sysproperty key="jbosstest.cluster.node0.http.url" value="${node0.http.url}"/>
<sysproperty key="jbosstest.cluster.node0.jndi.url" value="${node0.jndi.url}"/>
<sysproperty key="jbosstest.cluster.node1" value="${node1}"/>
+ <sysproperty key="jbosstest.cluster.node1.url" value="${node1.url}"/>
<sysproperty key="jbosstest.cluster.node1.http.url" value="${node1.http.url}"/>
<sysproperty key="jbosstest.cluster.node1.jndi.url" value="${node1.jndi.url}"/>
<sysproperty key="java.naming.provider.url" value="${test.jndi.url}"/>
@@ -4022,6 +4034,7 @@
<!-- MultiUnitBindTestCase needs to know the bind address to correctly
test the assertion -->
<sysproperty key="jboss.bind.address" value="${node0}"/>
+ <sysproperty key="jboss.bind.url.address" value="${node0.url}"/>
<jvmarg line="${jvmargs}" />
@@ -4105,13 +4118,15 @@
<sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/>
<sysproperty key="java.security.auth.login.config" value="${resources}/test/security/auth.conf"/>
<sysproperty key="jbosstest.server.host" value="${node0}"/>
+ <sysproperty key="jbosstest.server.host.url" value="${node0.url}"/>
-
<!-- properties needed for clustering -->
<sysproperty key="jbosstest.cluster.node0" value="${node0}"/>
+ <sysproperty key="jbosstest.cluster.node0.url" value="${node0.url}"/>
<sysproperty key="jbosstest.cluster.node0.http.url" value="${node0.http.url}"/>
<sysproperty key="jbosstest.cluster.node0.jndi.url" value="${node0.jndi.url}"/>
<sysproperty key="jbosstest.cluster.node1" value="${node1}"/>
+ <sysproperty key="jbosstest.cluster.node1.url" value="${node1.url}"/>
<sysproperty key="jbosstest.cluster.node1.http.url" value="${node1.http.url}"/>
<sysproperty key="jbosstest.cluster.node1.jndi.url" value="${node1.jndi.url}"/>
<sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
@@ -4122,6 +4137,7 @@
<!-- MultiUnitBindTestCase needs to know the bind address to correctly
test the assertion -->
<sysproperty key="jboss.bind.address" value="${node0}"/>
+ <sysproperty key="jboss.bind.url.address" value="${node0.url}"/>
<jvmarg line="${ejb3.jboss.jvmargs}" />
@@ -4167,6 +4183,7 @@
<sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/>
<sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/>
<sysproperty key="jbosstest.server.host" value="${node0}"/>
+ <sysproperty key="jbosstest.server.host.url" value="${node0.url}"/>
<classpath>
<pathelement location="${build.classes}"/>
@@ -5260,7 +5277,7 @@
<antcall target="test-with-jvmargs" inheritRefs="true">
<param name="test" value="${test}"/>
<param name="test.extension" value="jacorb"/>
- <param name="test.jndi.url" value="corbaloc::${node0}:3528/JBoss/Naming/root"/>
+ <param name="test.jndi.url" value="corbaloc::${node0.url}:3528/JBoss/Naming/root"/>
<!-- using jacorb -->
<param name="jvmargs" value="${debugFlags}
-Djava.security.manager
@@ -5269,7 +5286,7 @@
-Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
-Dorg.omg.PortableInterceptor.ORBInitializerClass.org.jboss.tm.iiop.TxClientInterceptorInitializer
-Dorg.omg.PortableInterceptor.ORBInitializerClass.org.jboss.iiop.csiv2.SASClientInitializer
- -DORBInitRef.NameService=corbaloc::${node0}:3528/JBoss/Naming/root
+ -DORBInitRef.NameService=corbaloc::${node0.url}:3528/JBoss/Naming/root
-Djacorb.log.default.verbosity=10
-Djacorb.log.loggerFactory=org.jboss.util.Log4jLoggerFactory" />
</antcall>
@@ -5284,7 +5301,10 @@
<param name="test" value="${test}"/>
<param name="test.extension" value="sunorb"/>
<!-- using sun jdk -->
- <param name="jvmargs" value="-Djava.security.manager -Djava.security.policy=${resources}/security/tst.policy -Dorg.omg.PortableInterceptor.ORBInitializerClass.org.jboss.tm.iiop.TxClientInterceptorInitializer -Dorg.omg.CORBA.ORBInitRef.NameService=corbaloc::${node0}:3528/JBoss/Naming/root"/>
+ <param name="jvmargs" value="-Djava.security.manager
+ -Djava.security.policy=${resources}/security/tst.policy
+ -Dorg.omg.PortableInterceptor.ORBInitializerClass.org.jboss.tm.iiop.TxClientInterceptorInitializer
+ -Dorg.omg.CORBA.ORBInitRef.NameService=corbaloc::${node0.url}:3528/JBoss/Naming/root"/>
</antcall>
</target>
Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/DBSetup.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/DBSetup.java 2009-12-02 17:04:08 UTC (rev 97309)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/DBSetup.java 2009-12-02 17:24:55 UTC (rev 97310)
@@ -84,7 +84,8 @@
protected void tearDown() throws Exception
{
Class.forName("org.hsqldb.jdbcDriver");
- String dbURL = "jdbc:hsqldb:hsql://" + System.getProperty("jbosstest.server.host", "localhost") + ":1701";
+ // JBPAPP-2997
+ String dbURL = "jdbc:hsqldb:hsql://" + System.getProperty("jbosstest.server.host.url", "localhost") + ":1701";
Connection conn = DriverManager.getConnection(dbURL, "sa", "");
Statement statement = conn.createStatement();
statement.executeQuery("SHUTDOWN COMPACT");
Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/clusteredentity/unit/BulkOperationsUnitTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/clusteredentity/unit/BulkOperationsUnitTestCase.java 2009-12-02 17:04:08 UTC (rev 97309)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/clusteredentity/unit/BulkOperationsUnitTestCase.java 2009-12-02 17:24:55 UTC (rev 97310)
@@ -49,12 +49,13 @@
public void testBulkOperations() throws Exception
{
System.out.println("*** testBulkOperations()");
- String node0 = System.getProperty("jbosstest.cluster.node0");
+ // JBPAPP-2997
+ String node0ForURL = System.getProperty("jbosstest.cluster.node0.url");
Properties prop0 = new Properties();
prop0.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
prop0.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
- prop0.put("java.naming.provider.url", "jnp://" + node0 + ":1099");
+ prop0.put("java.naming.provider.url", "jnp://" + node0ForURL + ":1099");
System.out.println("===== Node0 properties: ");
System.out.println(prop0);
Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/dd/web/util/HttpUtils.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/dd/web/util/HttpUtils.java 2009-12-02 17:04:08 UTC (rev 97309)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/dd/web/util/HttpUtils.java 2009-12-02 17:24:55 UTC (rev 97310)
@@ -46,9 +46,10 @@
public class HttpUtils
{
private static Logger log = Logger.getLogger(HttpUtils.class);
- private static String serverHost = System.getProperty("jbosstest.server.host", "localhost");
- private static String baseURL = "http://jduke:theduke@" + serverHost + ":" + Integer.getInteger("web.port", 8080) + "/";
- private static String baseURLNoAuth = "http://" + serverHost + ":" + Integer.getInteger("web.port", 8080) + "/";
+ // JBPAPP-2997
+ private static String serverHostForURL = System.getProperty("jbosstest.server.host.url", "localhost");
+ private static String baseURL = "http://jduke:theduke@" + serverHostForURL + ":" + Integer.getInteger("web.port", 8080) + "/";
+ private static String baseURLNoAuth = "http://" + serverHostForURL + ":" + Integer.getInteger("web.port", 8080) + "/";
public static final int GET = 1;
public static final int POST = 2;
@@ -64,7 +65,8 @@
}
public static String getBaseURL(String username, String password)
{
- String url = "http://"+username+":"+password+"@"+ System.getProperty("jboss.bind.address") + ":"
+ // JBPAPP-2997
+ String url = "http://"+username+":"+password+"@"+ System.getProperty("jboss.bind.url.address") + ":"
+ Integer.getInteger("web.port", 8080) + "/";
return url;
}
Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/jaccpropagation/unit/HttpUtils.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/jaccpropagation/unit/HttpUtils.java 2009-12-02 17:04:08 UTC (rev 97309)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/jaccpropagation/unit/HttpUtils.java 2009-12-02 17:24:55 UTC (rev 97310)
@@ -46,9 +46,9 @@
public class HttpUtils
{
private static Logger log = Logger.getLogger(HttpUtils.class);
- private static String serverHost = System.getProperty("jbosstest.server.host", "localhost");
- private static String baseURL = "http://jduke:theduke@" + serverHost + ":" + Integer.getInteger("web.port", 8080) + "/";
- private static String baseURLNoAuth = "http://" + serverHost + ":" + Integer.getInteger("web.port", 8080) + "/";
+ private static String serverHostForURL = System.getProperty("jbosstest.server.host.url", "localhost");
+ private static String baseURL = "http://jduke:theduke@" + serverHostForURL + ":" + Integer.getInteger("web.port", 8080) + "/";
+ private static String baseURLNoAuth = "http://" + serverHostForURL + ":" + Integer.getInteger("web.port", 8080) + "/";
public static final int GET = 1;
public static final int POST = 2;
@@ -64,7 +64,7 @@
}
public static String getBaseURL(String username, String password)
{
- String url = "http://"+username+":"+password+"@" + serverHost + ":"
+ String url = "http://"+username+":"+password+"@" + serverHostForURL + ":"
+ Integer.getInteger("web.port", 8080) + "/";
return url;
}
Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/jsp/unit/HttpUtils.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/jsp/unit/HttpUtils.java 2009-12-02 17:04:08 UTC (rev 97309)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/jsp/unit/HttpUtils.java 2009-12-02 17:24:55 UTC (rev 97310)
@@ -46,9 +46,9 @@
public class HttpUtils
{
private static Logger log = Logger.getLogger(HttpUtils.class);
- private static String serverHost = System.getProperty("jbosstest.server.host", "localhost");
- private static String baseURL = "http://jduke:theduke@" + serverHost + ":" + Integer.getInteger("web.port", 8080) + "/";
- private static String baseURLNoAuth = "http://" + serverHost + ":" + Integer.getInteger("web.port", 8080) + "/";
+ private static String serverHostForURL = System.getProperty("jbosstest.server.host.url", "localhost");
+ private static String baseURL = "http://jduke:theduke@" + serverHostForURL + ":" + Integer.getInteger("web.port", 8080) + "/";
+ private static String baseURLNoAuth = "http://" + serverHostForURL + ":" + Integer.getInteger("web.port", 8080) + "/";
public static final int GET = 1;
public static final int POST = 2;
@@ -64,7 +64,7 @@
}
public static String getBaseURL(String username, String password)
{
- String url = "http://"+username+":"+password+"@"+ System.getProperty("jboss.bind.address") + ":"
+ String url = "http://"+username+":"+password+"@"+ System.getProperty("jboss.bind.url.address") + ":"
+ Integer.getInteger("web.port", 8080) + "/";
return url;
}
Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/servlet/unit/HttpUtils.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/servlet/unit/HttpUtils.java 2009-12-02 17:04:08 UTC (rev 97309)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/ejb3/src/test/org/jboss/ejb3/test/servlet/unit/HttpUtils.java 2009-12-02 17:24:55 UTC (rev 97310)
@@ -46,9 +46,9 @@
public class HttpUtils
{
private static Logger log = Logger.getLogger(HttpUtils.class);
- private static String serverHost = System.getProperty("jbosstest.server.host", "localhost");
- private static String baseURL = "http://jduke:theduke@" + serverHost + ":" + Integer.getInteger("web.port", 8080) + "/";
- private static String baseURLNoAuth = "http://" + serverHost + ":" + Integer.getInteger("web.port", 8080) + "/";
+ private static String serverHostForURL = System.getProperty("jbosstest.server.host.url", "localhost");
+ private static String baseURL = "http://jduke:theduke@" + serverHostForURL + ":" + Integer.getInteger("web.port", 8080) + "/";
+ private static String baseURLNoAuth = "http://" + serverHostForURL + ":" + Integer.getInteger("web.port", 8080) + "/";
public static final int GET = 1;
public static final int POST = 2;
@@ -64,7 +64,7 @@
}
public static String getBaseURL(String username, String password)
{
- String url = "http://"+username+":"+password+"@" + serverHost + ":"
+ String url = "http://"+username+":"+password+"@" + serverHostForURL + ":"
+ Integer.getInteger("web.port", 8080) + "/";
return url;
}
Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/testsuite/build.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/testsuite/build.xml 2009-12-02 17:04:08 UTC (rev 97309)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/testsuite/build.xml 2009-12-02 17:24:55 UTC (rev 97310)
@@ -531,10 +531,11 @@
<macrodef name="wait-on-host">
<attribute name="seconds" default="120"/>
<attribute name="host" default="${node0}"/>
+ <attribute name="hostforurl" default="${node0.url}"/>
<sequential>
<echo message="Waiting for @{host} to start..."/>
<waitfor maxwait="@{seconds}" maxwaitunit="second" checkevery="5" checkeveryunit="second" timeoutproperty="startup.timeout">
- <http url="http://@{host}:8080/"/>
+ <http url="http://@{hostforurl}:8080/"/>
</waitfor>
<fail message="Timeout waiting for nodes to start" if="startup.timeout"/>
</sequential>
Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/testsuite/imports/server-config.xml
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/testsuite/imports/server-config.xml 2009-12-02 17:04:08 UTC (rev 97309)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/testsuite/imports/server-config.xml 2009-12-02 17:24:55 UTC (rev 97310)
@@ -473,7 +473,7 @@
<!-- A macro for stopping jboss with a jnp url
-->
<macrodef name="stop-jboss">
- <attribute name="url" default="jnp://${node0}:1099"
+ <attribute name="url" default="jnp://${node0.url}:1099"
description="The jndi provider url used to lookup the RMIAdaptor"/>
<attribute name="jvmargs" default=""
description="Addtional jvm args"/>
Modified: branches/JBPAPP_4_2_0_GA_CP_IPV6/testsuite/src/main/org/jboss/test/testbeancluster/test/DBSetup.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP_IPV6/testsuite/src/main/org/jboss/test/testbeancluster/test/DBSetup.java 2009-12-02 17:04:08 UTC (rev 97309)
+++ branches/JBPAPP_4_2_0_GA_CP_IPV6/testsuite/src/main/org/jboss/test/testbeancluster/test/DBSetup.java 2009-12-02 17:24:55 UTC (rev 97310)
@@ -85,6 +85,7 @@
Class.forName("org.hsqldb.jdbcDriver");
// JBPAPP-2997
String dbURL = "jdbc:hsqldb:hsql://" + System.getProperty("jbosstest.server.host.url", "localhost") + ":1701";
+ System.out.println("Connecting to dbURL " + dbURL + " for database shutdown..");
Connection conn = DriverManager.getConnection(dbURL, "sa", "");
Statement statement = conn.createStatement();
statement.executeQuery("SHUTDOWN COMPACT");
More information about the jboss-cvs-commits
mailing list