[jboss-cvs] JBoss Messaging SVN: r6944 - in branches/Branch_1_4/tests: src/org/jboss/test/messaging/tools and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed May 20 13:01:08 EDT 2009


Author: pthurmond at jboss.com
Date: 2009-05-20 13:01:08 -0400 (Wed, 20 May 2009)
New Revision: 6944

Modified:
   branches/Branch_1_4/tests/build.xml
   branches/Branch_1_4/tests/src/org/jboss/test/messaging/tools/ServerManagement.java
Log:
https://jira.jboss.org/jira/browse/JBMESSAGING-1630 - ipv6 support in testsuite

Modified: branches/Branch_1_4/tests/build.xml
===================================================================
--- branches/Branch_1_4/tests/build.xml	2009-05-20 16:50:44 UTC (rev 6943)
+++ branches/Branch_1_4/tests/build.xml	2009-05-20 17:01:08 UTC (rev 6944)
@@ -63,6 +63,7 @@
 	<property name="jboss.messaging.datachanneludpaddress" value="228.6.6.6" />
 	<property name="jboss.messaging.controlchanneludpaddress" value="228.7.7.7" />
 	<property name="jboss.messaging.ipttl" value="0" />
+   <property name="java.net.preferIPv4Stack" value="true"/>
 
 	<!--
         Functional tests.
@@ -605,17 +606,17 @@
 
 		<junit printsummary="${junit.printsummary}" fork="${junit.fork}" includeantruntime="yes" haltonerror="${junit.haltonerror}" haltonfailure="${junit.haltonfailure}" showoutput="${junit.showoutput}" timeout="${clustering.stress.junit.timeout}">
 
-			<sysproperty key="remote" value="true" />
-			<sysproperty key="module.output" value="${tests.output}" />
-			<sysproperty key="test.bind.address" value="${test.bind.address}" />
-			<sysproperty key="jgroups.bind_addr" value="${test.bind.address}" />
-			<sysproperty key="test.database" value="${clustering.tests.database}" />
-			<sysproperty key="test.clustered" value="true" />
-			<sysproperty key="test.logfile.suffix" value="clustering-client" />
-			<sysproperty key="objectstore.dir" value="${objectstore.dir}" />
-			<jvmarg value="-Xmx512M" />
-			<jvmarg value="-Djava.net.preferIPv4Stack=true" />
-			<!--
+         <sysproperty key="remote" value="true"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
+         <sysproperty key="test.bind.address" value="${test.bind.address}"/>
+         <sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
+         <sysproperty key="test.database" value="${clustering.tests.database}"/>
+         <sysproperty key="test.clustered" value="true"/>
+         <sysproperty key="test.logfile.suffix" value="clustering-client"/>
+         <sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
+         <sysproperty key="java.net.preferIPv4Stack" value="${java.net.preferIPv4Stack}" />
+	 <jvmarg value="-Xmx512M"/>
+         <!--
          <jvmarg line="-Xmx512M -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=n,suspend=n,address=antjunit"/>
           -->
 
@@ -649,23 +650,23 @@
 
 		<junit printsummary="${junit.printsummary}" fork="on" forkMode="once" includeantruntime="yes" haltonerror="${junit.haltonerror}" haltonfailure="${junit.haltonfailure}" showoutput="${junit.showoutput}" timeout="${clustering.junit.timeout}">
 
-			<sysproperty key="remote" value="true" />
-			<sysproperty key="module.output" value="${tests.output}" />
-			<sysproperty key="test.bind.address" value="${test.bind.address}" />
-			<sysproperty key="jboss.messaging.groupname" value="${jboss.messaging.groupname}" />
-			<sysproperty key="jboss.messaging.datachanneludpport" value="${jboss.messaging.datachanneludpport}" />
-			<sysproperty key="jboss.messaging.controlchanneludpport" value="${jboss.messaging.controlchanneludpport}" />
-			<sysproperty key="jboss.messaging.datachanneludpaddress" value="${jboss.messaging.datachanneludpaddress}" />
-			<sysproperty key="jboss.messaging.controlchanneludpaddress" value="${jboss.messaging.controlchanneludpaddress}" />
-			<sysproperty key="jboss.messaging.ipttl" value="${jboss.messaging.ipttl}" />
-			<sysproperty key="jgroups.bind_addr" value="${test.bind.address}" />
-			<sysproperty key="test.database" value="${clustering.tests.database}" />
-			<sysproperty key="test.clustered" value="true" />
-			<sysproperty key="test.logfile.suffix" value="clustering-client" />
-			<sysproperty key="objectstore.dir" value="${objectstore.dir}" />
-			<jvmarg value="-Xmx512M" />
-			<jvmarg value="-Djava.net.preferIPv4Stack=true" />
-			<!--
+         <sysproperty key="remote" value="true"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
+         <sysproperty key="test.bind.address" value="${test.bind.address}"/>
+         <sysproperty key="jboss.messaging.groupname" value="${jboss.messaging.groupname}"/>
+         <sysproperty key="jboss.messaging.datachanneludpport" value="${jboss.messaging.datachanneludpport}"/>
+         <sysproperty key="jboss.messaging.controlchanneludpport" value="${jboss.messaging.controlchanneludpport}"/>
+         <sysproperty key="jboss.messaging.datachanneludpaddress" value="${jboss.messaging.datachanneludpaddress}"/>
+         <sysproperty key="jboss.messaging.controlchanneludpaddress" value="${jboss.messaging.controlchanneludpaddress}"/>
+         <sysproperty key="jboss.messaging.ipttl" value="${jboss.messaging.ipttl}"/>
+         <sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
+         <sysproperty key="test.database" value="${clustering.tests.database}"/>
+         <sysproperty key="test.clustered" value="true"/>
+         <sysproperty key="test.logfile.suffix" value="clustering-client"/>
+         <sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
+         <sysproperty key="java.net.preferIPv4Stack" value="${java.net.preferIPv4Stack}" />
+	 <jvmarg value="-Xmx512M"/>
+         <!--
          <jvmarg line="-Xmx512M -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=n,suspend=n,address=antjunit"/>
           -->
 
@@ -782,18 +783,18 @@
 
 		<junit printsummary="${junit.printsummary}" fork="${junit.fork}" includeantruntime="yes" haltonerror="${junit.haltonerror}" haltonfailure="${junit.haltonfailure}" showoutput="${junit.showoutput}" timeout="${junit.timeout}">
 
-			<sysproperty key="remote" value="true" />
-			<sysproperty key="module.output" value="${tests.output}" />
-			<sysproperty key="test.bind.address" value="${test.bind.address}" />
-			<sysproperty key="jgroups.bind_addr" value="${test.bind.address}" />
-			<sysproperty key="test.database" value="${clustering.tests.database}" />
-			<sysproperty key="test.clustered" value="true" />
-			<sysproperty key="test.logfile.suffix" value="clustering-client" />
-			<sysproperty key="objectstore.dir" value="${objectstore.dir}" />
-			<jvmarg value="-Xmx512M" />
-			<jvmarg value="-Djava.net.preferIPv4Stack=true" />
-			<jvmarg value="-agentlib:jbossAgent" />
-			<!--
+         <sysproperty key="remote" value="true"/>
+         <sysproperty key="module.output" value="${tests.output}"/>
+         <sysproperty key="test.bind.address" value="${test.bind.address}"/>
+         <sysproperty key="jgroups.bind_addr" value="${test.bind.address}"/>
+         <sysproperty key="test.database" value="${clustering.tests.database}"/>
+         <sysproperty key="test.clustered" value="true"/>
+         <sysproperty key="test.logfile.suffix" value="clustering-client"/>
+         <sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
+         <sysproperty key="java.net.preferIPv4Stack" value="${java.net.preferIPv4Stack}" />
+	 <jvmarg value="-Xmx512M"/>
+         <jvmarg value="-agentlib:jbossAgent"/>
+         <!--
          <jvmarg line="-Xmx512M -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=n,suspend=n,address=antjunit"/>
           -->
 

Modified: branches/Branch_1_4/tests/src/org/jboss/test/messaging/tools/ServerManagement.java
===================================================================
--- branches/Branch_1_4/tests/src/org/jboss/test/messaging/tools/ServerManagement.java	2009-05-20 16:50:44 UTC (rev 6943)
+++ branches/Branch_1_4/tests/src/org/jboss/test/messaging/tools/ServerManagement.java	2009-05-20 17:01:08 UTC (rev 6944)
@@ -523,9 +523,18 @@
 
       // As there is a problem with Multicast and JGroups on Linux (in certain JDKs)
       // The stack introduced by multiplexer might fail under Linux if we don't have this
-      if (System.getProperty("os.name").equals("Linux"))
+      
+      
+      if (System.getProperty("os.name").equals("Linux") )
       {
-         sb.append(" -Djava.net.preferIPv4Stack=true ");
+          //most JDK's >= 6 work fine with ipv6
+         String version = System.getProperty("java.version");
+         int v = Character.getNumericValue(version.charAt(2));
+         if( v < 6) {
+             log.info("Setting java.net.preferIPv4Stack=true" );
+             sb.append(" -Djava.net.preferIPv4Stack=true ");
+         }
+
       }
 
       sb.append("org.jboss.test.messaging.tools.container.RMITestServer");




More information about the jboss-cvs-commits mailing list