[jboss-cvs] JBoss Messaging SVN: r2559 - in branches/Branch_1_2_0_SP/tests: src/org/jboss/test/messaging/jms and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Mar 23 15:17:01 EDT 2007
Author: clebert.suconic at jboss.com
Date: 2007-03-23 15:17:01 -0400 (Fri, 23 Mar 2007)
New Revision: 2559
Modified:
branches/Branch_1_2_0_SP/tests/build.xml
branches/Branch_1_2_0_SP/tests/src/org/jboss/test/messaging/jms/JMSTest.java
Log:
Adding test that would fail if using AOP2.
Modified: branches/Branch_1_2_0_SP/tests/build.xml
===================================================================
--- branches/Branch_1_2_0_SP/tests/build.xml 2007-03-22 03:24:06 UTC (rev 2558)
+++ branches/Branch_1_2_0_SP/tests/build.xml 2007-03-23 19:17:01 UTC (rev 2559)
@@ -300,6 +300,27 @@
</java>
</target>
+ <!-- Starts an all config already when starting the rmi server (used on crash tests) -->
+ <target name="start-rmi-server-with-allconfig" depends="init"
+ description="Starts an all config already when starting the rmi server (used on crash tests)">
+
+ <java classname="org.jboss.test.messaging.tools.jmx.rmi.RMITestServer" fork="true" spawn="true">
+ <sysproperty key="module.output" value="${tests.output}"/>
+ <sysproperty key="test.logfile.suffix" value="${remote.server.test.logfile.suffix}"/>
+ <sysproperty key="test.bind.address" value="${test.bind.address}"/>
+ <sysproperty key="test.database" value="${functional.tests.database}"/>
+ <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
+ <sysproperty key="test.remoting" value="${test.remoting}"/>
+ <sysproperty key="java.net.preferIPv4Stack" value="true"/>
+ <sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=rmiserver"/>
+ -->
+ <arg value="-startAll"/>
+ <classpath refid="test.execution.classpath"/>
+ </java>
+ </target>
+
<target name="start-rmi-server-clustering" depends="init"
description="Starts the RMI server used by clustering tests">
@@ -844,6 +865,91 @@
</target>
+
+ <target name="tmp1" depends="tests-jar, prepare-testdirs, clear-test-logs">
+ <java classname="org.jboss.test.messaging.tools.jmx.rmi.RMITestServer" fork="true">
+ <sysproperty key="module.output" value="${tests.output}"/>
+ <sysproperty key="test.logfile.suffix" value="tmp-server"/>
+ <sysproperty key="test.bind.address" value="${test.bind.address}"/>
+ <sysproperty key="test.database" value="${functional.tests.database}"/>
+ <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
+ <sysproperty key="test.remoting" value="${test.remoting}"/>
+ <sysproperty key="java.net.preferIPv4Stack" value="true"/>
+ <sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=rmiserver"/>
+ -->
+ <arg value="-startAll"/>
+ <classpath refid="test.execution.classpath"/>
+ </java>
+ </target>
+
+ <target name="tmp2" depends="tests-jar, prepare-testdirs">
+
+ <java classname="org.jboss.test.messaging.jms.crash.simultaneousfailure.FailingClient" >
+ <sysproperty key="module.output" value="${tests.output}"/>
+ <sysproperty key="test.logfile.suffix" value="crash-client"/>
+ <sysproperty key="test.bind.address" value="${test.bind.address}"/>
+ <sysproperty key="test.database" value="${functional.tests.database}"/>
+ <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
+ <sysproperty key="test.remoting" value="${test.remoting}"/>
+ <sysproperty key="remote" value="true"/>
+ <sysproperty key="java.net.preferIPv4Stack" value="true"/>
+ <sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=rmiserver"/>
+ -->
+ <classpath refid="test.execution.classpath"/>
+ </java>
+ </target>
+
+
+
+ <target name="tmp3" depends="tests-jar, prepare-testdirs">
+ <antcall target="crash-test">
+ <param name="crash.test.name" value="org.jboss.test.messaging.jms.crash.simultaneousfailure.SimultaneousFailureTest"/>
+ </antcall>
+
+ </target>
+
+ <target name="simultaneous-crash" depends="tests-jar, prepare-testdirs, clear-test-logs">
+ <antcall target="stop-rmi-server"/>
+
+ <antcall target="start-rmi-server-with-allconfig">
+ <param name="remote.server.test.logfile.suffix" value="multiple-crash"/>
+ </antcall>
+
+ <sleep seconds="20"/>
+
+
+ <java classname="org.jboss.test.messaging.jms.crash.simultaneousfailure.FailingClient" fork="true" spawn="true">
+ <sysproperty key="module.output" value="${tests.output}"/>
+ <sysproperty key="test.logfile.suffix" value="crash-client"/>
+ <sysproperty key="test.bind.address" value="${test.bind.address}"/>
+ <sysproperty key="test.database" value="${functional.tests.database}"/>
+ <sysproperty key="test.serialization" value="${functional.tests.serialization}"/>
+ <sysproperty key="test.remoting" value="${test.remoting}"/>
+ <sysproperty key="remote" value="true"/>
+ <sysproperty key="java.net.preferIPv4Stack" value="true"/>
+ <sysproperty key="objectstore.dir" value="${objectstore.dir}"/>
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_shmem,server=y,suspend=y,address=rmiserver"/>
+ -->
+ <classpath refid="test.execution.classpath"/>
+ </java>
+
+ <antcall target="crash-test">
+ <param name="crash.test.name" value="org.jboss.test.messaging.jms.crash.simultaneousfailure.SimultaneousFailureTest"/>
+ </antcall>
+
+
+
+
+ <sleep seconds="120"/>
+
+ <antcall target="stop-rmi-server"/>
+ </target>
+
<target name="crash-tests" depends="tests-jar, prepare-testdirs, clear-test-logs"
description="Runs crash tests">
Modified: branches/Branch_1_2_0_SP/tests/src/org/jboss/test/messaging/jms/JMSTest.java
===================================================================
--- branches/Branch_1_2_0_SP/tests/src/org/jboss/test/messaging/jms/JMSTest.java 2007-03-22 03:24:06 UTC (rev 2558)
+++ branches/Branch_1_2_0_SP/tests/src/org/jboss/test/messaging/jms/JMSTest.java 2007-03-23 19:17:01 UTC (rev 2559)
@@ -127,6 +127,42 @@
conn.close();
}
+ public void test_CreateTextMessageNull() throws Exception
+ {
+ ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
+
+ Queue queue = (Queue)ic.lookup("/queue/JMSTestQueue");
+
+ Connection conn = cf.createConnection();
+
+ Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ MessageProducer prod = session.createProducer(queue);
+ prod.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
+
+ TextMessage m = session.createTextMessage();
+
+ m.setText("message one");
+
+ prod.send(m);
+
+ conn.close();
+
+ conn = cf.createConnection();
+
+ session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ MessageConsumer cons = session.createConsumer(queue);
+
+ conn.start();
+
+ TextMessage rm = (TextMessage)cons.receive();
+
+ assertEquals("message one", rm.getText());
+
+ conn.close();
+ }
+
public void test_Persistent_NonTransactional() throws Exception
{
ConnectionFactory cf = (ConnectionFactory)ic.lookup("/ConnectionFactory");
More information about the jboss-cvs-commits
mailing list