[jboss-cvs] JBossAS SVN: r64473 - in trunk: testsuite and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 7 00:27:44 EDT 2007
Author: clebert.suconic at jboss.com
Date: 2007-08-07 00:27:44 -0400 (Tue, 07 Aug 2007)
New Revision: 64473
Added:
trunk/testsuite/src/main/org/jboss/test/messagedriven/support/StartOperation.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/support/StopOperation.java
Modified:
trunk/build/build-thirdparty.xml
trunk/testsuite/build.xml
trunk/testsuite/src/main/org/jboss/test/messagedriven/beans/TestMessageDriven.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagementMBean.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/support/ActivateOperation.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckJMSDestinationOperation.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessageIDOperation.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessagePropertyOperation.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessageSizeOperation.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/support/DeactivateOperation.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/support/Operation.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/support/SendMessageOperation.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/test/DurableTopicMessageDrivenUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerDurableTopicMessageDrivenUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerQueueMessageDrivenUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerTopicMessageDrivenUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleQueueMessageDrivenUnitTestCase.java
trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleTopicMessageDrivenUnitTestCase.java
trunk/testsuite/src/resources/messagedriven/jar/META-INF/ejb-jar.xml
Log:
http://jira.jboss.com/jira/browse/JBAS-4594 - Fixing jbossMessaging testcases
Modified: trunk/build/build-thirdparty.xml
===================================================================
--- trunk/build/build-thirdparty.xml 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/build/build-thirdparty.xml 2007-08-07 04:27:44 UTC (rev 64473)
@@ -96,7 +96,7 @@
<componentref name="jboss/jbossxb" version="2.0.0.CR2"/>
<componentref name="jboss/jbossws-native50" version="snapshot"/>
<componentref name="jboss/jbossws-jboss50" version="snapshot"/>
- <componentref name="jboss/messaging" version="1.4.0.CR1"/>
+ <componentref name="jboss/messaging" version="snapshot"/>
<componentref name="jboss/microcontainer" version="snapshot-classloader"/>
<componentref name="jboss/jboss-vfs" version="2.0.0.Beta4"/>
<componentref name="jboss/remoting" version="2.2.0.SP4"/>
Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/build.xml 2007-08-07 04:27:44 UTC (rev 64473)
@@ -788,11 +788,13 @@
<exclude name="org/jboss/test/cache/test/local/ConcurrentTransactionalUnitTestCase.class" />
<!-- JBAS-2889 Doesnt clean up deployments. Removed until fixed. -->
<exclude name="org/jboss/test/client/test/AppClientUnitTestCase.class"/>
- <!-- JMS agnostic tests need to be identified -->
- <exclude name="org/jboss/test/jbossmq/**"/>
<!-- JBAS-2026 -->
<exclude name="org/jboss/test/jmx/test/JarInSarJSR77UnitTestCase.class"/>
</patternset>
+
+ <patternset id="jbossmq.excludes">
+ <exclude name="org/jboss/test/jbossmq/**"/>
+ </patternset>
<patternset id="aop-with-classloader.excludes">
<!-- Needs to be started either with the bootclasspath or -javaagent classloader hooks -->
@@ -820,7 +822,7 @@
<patternset refid="compatibility.excludes"/>
<patternset refid="binding-manager.excludes"/>
<patternset refid="dtm.excludes"/>
- <patternset refid="jbpm-bpel.excludes"/>
+ <patternset refid="jbossmq.excludes"/>
</patternset>
<!-- A target that allows for conditional dependency on the compilation and
@@ -858,7 +860,6 @@
<antcall target="tests-compatibility"/>
<antcall target="tests-webservice-ssl"/>
<antcall target="tests-aop-scoped"/>
- <!-- <antcall target="tests-jbossmessaging"/> -->
<antcall target="tests-classloader-leak"/>
<antcall target="tests-report"/>
<record name="${basedir}/build.log" action="stop"/>
@@ -881,9 +882,10 @@
</target>
<target name="jboss-all-config-tests"
- description="The units tests which are run against the jboss all config">
+ description="The units tests which are run against the jboss all config" depends="init">
<server:start name="all"/>
- <antcall target="tests-standard-unit"/>
+ <antcall target="tests-standard-unit"/>
+ <antcall target="tests-jbossmessaging"/>
<antcall target="tests-client-unit"/>
<antcall target="tests-security-basic-unit"/>
<antcall target="tests-standard-stress"/>
@@ -894,7 +896,6 @@
<antcall target="tests-scout-jaxr"/>
<antcall target="tests-webservice" />
<antcall target="tests-aspects"/>
-
<server:stop name="all"/>
</target>
@@ -1742,7 +1743,9 @@
<sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
<sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
<sysproperty key="jbosstest.server.host" value="${node0}"/>
- <!-- Pass along any jbosstest.* system properties -->
+ <sysproperty key="jbosstest.useJBM" value="true"/>
+
+ <!-- Pass along any jbosstest.* system properties -->
<syspropertyset>
<propertyref prefix="jbosstest."/>
</syspropertyset>
@@ -2910,6 +2913,8 @@
<sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/>
<sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
<sysproperty key="jbosstest.server.host" value="${node0}"/>
+ <sysproperty key="jbosstest.useJBM" value="true"/>
+
<!-- Pass along any jbosstest.* system properties -->
<syspropertyset>
<propertyref prefix="jbosstest."/>
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/beans/TestMessageDriven.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/beans/TestMessageDriven.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/beans/TestMessageDriven.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.beans;
import java.util.Enumeration;
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagement.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,31 +1,36 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.mbeans;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Properties;
import javax.jms.Message;
+import javax.jms.TextMessage;
import javax.naming.InitialContext;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
@@ -76,10 +81,10 @@
{
synchronized (messages)
{
- messages.add(message);
+ messages.add(cloneMessage(message));
}
}
-
+
public ArrayList getMessages()
{
synchronized (messages)
@@ -111,4 +116,29 @@
System.setProperty("test.messagedriven." + key, props.getProperty(key));
}
}
+
+ /**
+ * JBossMessage will resend the send message, and because of that the message needs to be cloned before being stored
+ * @param message
+ * @return
+ */
+ private Message cloneMessage(Message message)
+ {
+ try
+ {
+ ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+ ObjectOutputStream cloneOut = new ObjectOutputStream(byteOut);
+ cloneOut.writeObject(message);
+ cloneOut.close();
+ ObjectInputStream inputArray = new ObjectInputStream (new ByteArrayInputStream(byteOut.toByteArray()));
+ message = (Message)inputArray.readObject();
+ }
+ catch (Exception e)
+ {
+ log.error(e.toString(), e);
+ }
+ return message;
+ }
+
+
}
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagementMBean.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagementMBean.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/mbeans/TestMessageDrivenManagementMBean.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.mbeans;
import java.util.ArrayList;
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/ActivateOperation.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/ActivateOperation.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/ActivateOperation.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.support;
import javax.management.ObjectName;
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -33,6 +33,7 @@
import javax.jms.Message;
import javax.jms.MessageProducer;
import javax.jms.Session;
+import javax.jms.TextMessage;
import javax.management.ObjectName;
import org.jboss.mx.util.ObjectNameFactory;
@@ -51,17 +52,29 @@
protected static final long WAIT_TIME = 5000L;
protected static final long REPEATED_WAIT = 4;
- protected static final ObjectName testQueue = ObjectNameFactory.create("jboss.mq.destination:service=Queue,name=testQueue");
- protected static final Properties testQueueProps = new Properties();
+ protected static ObjectName testQueue = ObjectNameFactory.create("jboss.mq.destination:service=Queue,name=testQueue");
+ protected static Properties testQueueProps = new Properties();
- protected static final ObjectName testTopic = ObjectNameFactory.create("jboss.mq.destination:service=Topic,name=testTopic");
- protected static final Properties testTopicProps = new Properties();
+ protected static ObjectName testTopic = ObjectNameFactory.create("jboss.mq.destination:service=Topic,name=testTopic");
+ protected static Properties testTopicProps = new Properties();
- protected static final ObjectName testDurableTopic = ObjectNameFactory.create("jboss.mq.destination:service=Topic,name=testDurableTopic");
- protected static final Properties testDurableTopicProps = new Properties();
+ protected static ObjectName testDurableTopic = ObjectNameFactory.create("jboss.mq.destination:service=Topic,name=testDurableTopic");
+ protected static Properties testDurableTopicProps = new Properties();
+
+ protected static ObjectName dlqJMXDestination = ObjectNameFactory.create("jboss.mq.destination:service=Queue,name=DLQ");
static
{
+
+
+ if (System.getProperty("jbosstest.useJBM") != null)
+ {
+ testQueue = ObjectNameFactory.create("jboss.messaging.destination:service=Queue,name=testQueue");
+ testTopic = ObjectNameFactory.create("jboss.messaging.destination:service=Topic,name=testTopic");
+ testDurableTopic = ObjectNameFactory.create("jboss.messaging.destination:service=Topic,name=testDurableTopic");
+ dlqJMXDestination = ObjectNameFactory.create("jboss.messaging.destination:service=Queue,name=DLQ");
+ }
+
testQueueProps.put("destination", "queue/testQueue");
testQueueProps.put("destinationType", "javax.jms.Queue");
@@ -84,7 +97,6 @@
protected String mbeansar = "testmessagedriven.sar";
protected ObjectName jmxDestination = ObjectNameFactory.create("does:not=exist");
- protected ObjectName dlqJMXDestination = ObjectNameFactory.create("jboss.mq.destination:service=Queue,name=DLQ");
protected String connectionFactoryJNDI = "ConnectionFactory";
protected Destination destination;
protected Destination dlqDestination;
@@ -137,6 +149,7 @@
if (destination != null)
return destination;
String jndiName = (String) getAttribute(getJMXDestination(), "JNDIName");
+ //System.out.println("***************************** jndiName=" + jndiName);
destination = (Destination) lookup(jndiName, Destination.class);
return destination;
}
@@ -209,15 +222,17 @@
}
}
- public Message getTestMessage() throws Exception
+ public TextMessage getTestMessage() throws Exception
{
- return getSession().createMessage();
+ return getSession().createTextMessage();
}
protected void setUp() throws Exception
{
+ super.setUp();
if ("testServerFound".equals(getName()))
return;
+ System.out.println("MbeanSAR=" + mbeansar);
deploy(mbeansar);
}
@@ -233,6 +248,7 @@
{
getLog().error("Error undeploying: " + mbeansar, t);
}
+ super.tearDown();
}
protected void startTest(Properties props) throws Exception
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckJMSDestinationOperation.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckJMSDestinationOperation.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckJMSDestinationOperation.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,27 +1,29 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.support;
+import javax.jms.Destination;
import javax.jms.Message;
+import javax.jms.TextMessage;
/**
* Check a message property
@@ -32,9 +34,9 @@
public class CheckJMSDestinationOperation extends Operation
{
protected int msgNo;
- protected String destination;
+ protected Destination destination;
- public CheckJMSDestinationOperation(BasicMessageDrivenUnitTest test, int msgNo, String destination)
+ public CheckJMSDestinationOperation(BasicMessageDrivenUnitTest test, int msgNo, Destination destination)
{
super(test);
this.msgNo = msgNo;
@@ -43,9 +45,11 @@
public void run() throws Exception
{
- Message message = (Message) test.getMessages().get(msgNo);
- String actual = message.getJMSDestination().toString();
- if (actual == null || actual.startsWith(destination) == false)
- throw new Exception("For msgNo=" + msgNo + " destination=" + actual + " Expected=" + destination + " msg=" + message);
+ TextMessage message = (TextMessage) test.getMessages().get(msgNo);
+ Destination msgdest = message.getJMSDestination();
+
+ if (message == null || !msgdest.equals(destination))
+ throw new Exception("**** For msgNo=" + msgNo + " destination=" + destination.toString() + " received=" + msgdest.toString());
+
}
}
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessageIDOperation.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessageIDOperation.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessageIDOperation.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.support;
/**
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessagePropertyOperation.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessagePropertyOperation.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessagePropertyOperation.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.support;
import javax.jms.Message;
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessageSizeOperation.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessageSizeOperation.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/CheckMessageSizeOperation.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.support;
/**
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/DeactivateOperation.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/DeactivateOperation.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/DeactivateOperation.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.support;
import javax.management.ObjectName;
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/Operation.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/Operation.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/Operation.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.support;
/**
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/SendMessageOperation.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/SendMessageOperation.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/SendMessageOperation.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -24,6 +24,7 @@
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageProducer;
+import javax.jms.TextMessage;
/**
* Send a message
@@ -51,7 +52,8 @@
try
{
MessageProducer producer = test.getMessageProducer();
- Message message = test.getTestMessage();
+ TextMessage message = test.getTestMessage();
+ message.setText(id);
message.setStringProperty(MESSAGEID, id);
producer.send(message);
// DONE
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/SimpleMessageDrivenUnitTest.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.support;
import java.util.Properties;
@@ -70,7 +70,7 @@
{
new SendMessageOperation(this, "1"),
new CheckMessageSizeOperation(this, 1, 0),
- new CheckJMSDestinationOperation(this, 0, getDestination().toString()),
+ new CheckJMSDestinationOperation(this, 0, getDestination()),
new CheckMessageIDOperation(this, 0, "1"),
};
}
@@ -80,14 +80,14 @@
return new Operation[]
{
new SendMessageOperation(this, "1"),
- new CheckMessageSizeOperation(this, 7, 0),
- new CheckJMSDestinationOperation(this, 0, getDestination().toString()),
- new CheckJMSDestinationOperation(this, 1, getDestination().toString()),
- new CheckJMSDestinationOperation(this, 2, getDestination().toString()),
- new CheckJMSDestinationOperation(this, 3, getDestination().toString()),
- new CheckJMSDestinationOperation(this, 4, getDestination().toString()),
- new CheckJMSDestinationOperation(this, 5, getDestination().toString()),
- new CheckJMSDestinationOperation(this, 6, getDLQDestination().toString()),
+ new CheckMessageSizeOperation(this, 7, 500),
+ new CheckJMSDestinationOperation(this, 0, getDestination()),
+ new CheckJMSDestinationOperation(this, 1, getDestination()),
+ new CheckJMSDestinationOperation(this, 2, getDestination()),
+ new CheckJMSDestinationOperation(this, 3, getDestination()),
+ new CheckJMSDestinationOperation(this, 4, getDestination()),
+ new CheckJMSDestinationOperation(this, 5, getDestination()),
+ new CheckJMSDestinationOperation(this, 6, getDLQDestination()),
new CheckMessageIDOperation(this, 0, "1"),
new CheckMessageIDOperation(this, 1, "1"),
new CheckMessageIDOperation(this, 2, "1"),
Added: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/StartOperation.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/StartOperation.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/StartOperation.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.messagedriven.support;
+
+import javax.management.ObjectName;
+
+/**
+ * Start mbean
+ *
+ * @author <a href="mailto:adrian at jboss.com>Adrian Brock</a>
+ * @version <tt>$Revision: 1.4</tt>
+ */
+public class StartOperation extends Operation
+{
+ protected ObjectName mbean;
+
+ public StartOperation(BasicMessageDrivenUnitTest test, ObjectName mbean)
+ {
+ super(test);
+ this.mbean = mbean;
+ }
+
+ public void run() throws Exception
+ {
+ test.start(mbean);
+ }
+}
Property changes on: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/StartOperation.java
___________________________________________________________________
Name: svn:keywords
+ Id LastChangedDate Author Revision
Added: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/StopOperation.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/support/StopOperation.java (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/support/StopOperation.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.messagedriven.support;
+
+import javax.management.ObjectName;
+
+/**
+ * Stop mbean
+ *
+ * @author <a href="mailto:adrian at jboss.com>Adrian Brock</a>
+ * @version <tt>$Revision: 1.4</tt>
+ */
+public class StopOperation extends Operation
+{
+ protected ObjectName mbean;
+
+ public StopOperation(BasicMessageDrivenUnitTest test, ObjectName mbean)
+ {
+ super(test);
+ this.mbean = mbean;
+ }
+
+ public void run() throws Exception
+ {
+ test.stop(mbean);
+ }
+}
Property changes on: trunk/testsuite/src/main/org/jboss/test/messagedriven/support/StopOperation.java
___________________________________________________________________
Name: svn:keywords
+ Id LastChangedDate Author Revision
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/test/DurableTopicMessageDrivenUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/test/DurableTopicMessageDrivenUnitTestCase.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/test/DurableTopicMessageDrivenUnitTestCase.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,28 +1,26 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.test;
-import junit.framework.Test;
-
import org.jboss.test.messagedriven.support.SimpleMessageDrivenUnitTest;
/**
@@ -37,11 +35,4 @@
{
super(name, testDurableTopic, testDurableTopicProps);
}
-
- public static Test suite() throws Exception
- {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- return getDeploySetup(DurableTopicMessageDrivenUnitTestCase.class,
- loader.getResource("messaging/test-destinations-full-service.xml").toString());
- }
}
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerDurableTopicMessageDrivenUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerDurableTopicMessageDrivenUnitTestCase.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerDurableTopicMessageDrivenUnitTestCase.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.test;
import org.jboss.test.messagedriven.support.ActivateOperation;
@@ -57,22 +57,15 @@
new ActivateOperation(this, mdbInvoker),
new SendMessageOperation(this, "2"),
new CheckMessageSizeOperation(this, 1, 0),
- new CheckJMSDestinationOperation(this, 0, getDestination().toString()),
+ new CheckJMSDestinationOperation(this, 0, getDestination()),
new CheckMessageIDOperation(this, 0, "2"),
new DeactivateOperation(this, mdbInvoker),
new SendMessageOperation(this, "3"),
new CheckMessageSizeOperation(this, 1, 5000),
new ActivateOperation(this, mdbInvoker),
new CheckMessageSizeOperation(this, 2, 0),
- new CheckJMSDestinationOperation(this, 1, getDestination().toString()),
+ new CheckJMSDestinationOperation(this, 1, getDestination()),
new CheckMessageIDOperation(this, 1, "3"),
};
}
-
- public static junit.framework.Test suite() throws Exception
- {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- return getDeploySetup(JMSContainerInvokerDurableTopicMessageDrivenUnitTestCase.class,
- loader.getResource("messaging/test-destinations-full-service.xml").toString());
- }
}
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerQueueMessageDrivenUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerQueueMessageDrivenUnitTestCase.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerQueueMessageDrivenUnitTestCase.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.test;
import org.jboss.test.messagedriven.support.ActivateOperation;
@@ -29,6 +29,8 @@
import org.jboss.test.messagedriven.support.JMSContainerInvokerSimpleMessageDrivenUnitTest;
import org.jboss.test.messagedriven.support.Operation;
import org.jboss.test.messagedriven.support.SendMessageOperation;
+import org.jboss.test.messagedriven.support.StartOperation;
+import org.jboss.test.messagedriven.support.StopOperation;
/**
* Tests of ejb 2.1 using the JMSContainerInvoker
@@ -47,6 +49,30 @@
{
return "jmscontainerinvoker.jar";
}
+
+ public void testRestartJMS() throws Exception
+ {
+ if (System.getProperty("jbosstest.useJBM") == null)
+ {
+ Operation[] operations = new Operation[]
+ {
+ new SendMessageOperation(this, "1"),
+ new CheckMessageSizeOperation(this, 1, 0),
+ new CheckJMSDestinationOperation(this, 0, getDestination()),
+ new CheckMessageIDOperation(this, 0, "1"),
+ new StopOperation(this, persistenceManager),
+ new StartOperation(this, persistenceManager),
+ new SendMessageOperation(this, "2"),
+ new CheckMessageSizeOperation(this, 2, 20000),
+ new CheckJMSDestinationOperation(this, 0, getDestination()),
+ };
+ runTest(operations, defaultProps);
+ }
+ else
+ {
+ System.out.println("testRestartJMS doesn't make sense to be executed on JBM");
+ }
+ }
public Operation[] getDeliveryActiveOperations() throws Exception
{
@@ -56,22 +82,15 @@
new CheckMessageSizeOperation(this, 0, 5000),
new ActivateOperation(this, mdbInvoker),
new CheckMessageSizeOperation(this, 1, 0),
- new CheckJMSDestinationOperation(this, 0, getDestination().toString()),
+ new CheckJMSDestinationOperation(this, 0, getDestination()),
new CheckMessageIDOperation(this, 0, "1"),
new DeactivateOperation(this, mdbInvoker),
new SendMessageOperation(this, "2"),
new CheckMessageSizeOperation(this, 1, 5000),
new ActivateOperation(this, mdbInvoker),
new CheckMessageSizeOperation(this, 2, 0),
- new CheckJMSDestinationOperation(this, 1, getDestination().toString()),
+ new CheckJMSDestinationOperation(this, 1, getDestination()),
new CheckMessageIDOperation(this, 1, "2"),
};
}
-
- public static junit.framework.Test suite() throws Exception
- {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- return getDeploySetup(JMSContainerInvokerQueueMessageDrivenUnitTestCase.class,
- loader.getResource("messaging/test-destinations-full-service.xml").toString());
- }
}
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerTopicMessageDrivenUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerTopicMessageDrivenUnitTestCase.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/test/JMSContainerInvokerTopicMessageDrivenUnitTestCase.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.test;
import org.jboss.test.messagedriven.support.ActivateOperation;
@@ -58,7 +58,7 @@
new CheckMessageSizeOperation(this, 0, 5000),
new SendMessageOperation(this, "1"),
new CheckMessageSizeOperation(this, 1, 0),
- new CheckJMSDestinationOperation(this, 0, getDestination().toString()),
+ new CheckJMSDestinationOperation(this, 0, getDestination()),
new CheckMessageIDOperation(this, 0, "1"),
new DeactivateOperation(this, mdbInvoker),
new SendMessageOperation(this, "2"),
@@ -67,11 +67,4 @@
new CheckMessageSizeOperation(this, 1, 5000),
};
}
-
- public static junit.framework.Test suite() throws Exception
- {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- return getDeploySetup(JMSContainerInvokerTopicMessageDrivenUnitTestCase.class,
- loader.getResource("messaging/test-destinations-full-service.xml").toString());
- }
}
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleQueueMessageDrivenUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleQueueMessageDrivenUnitTestCase.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleQueueMessageDrivenUnitTestCase.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.test;
import org.jboss.test.messagedriven.support.SimpleMessageDrivenUnitTest;
@@ -35,11 +35,4 @@
{
super(name, testQueue, testQueueProps);
}
-
- public static junit.framework.Test suite() throws Exception
- {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- return getDeploySetup(SimpleQueueMessageDrivenUnitTestCase.class,
- loader.getResource("messaging/test-destinations-full-service.xml").toString());
- }
}
Modified: trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleTopicMessageDrivenUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleTopicMessageDrivenUnitTestCase.java 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/main/org/jboss/test/messagedriven/test/SimpleTopicMessageDrivenUnitTestCase.java 2007-08-07 04:27:44 UTC (rev 64473)
@@ -1,24 +1,24 @@
/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.test.messagedriven.test;
import org.jboss.test.messagedriven.support.SimpleMessageDrivenUnitTest;
@@ -35,12 +35,4 @@
{
super(name, testTopic, testTopicProps);
}
-
- public static junit.framework.Test suite() throws Exception
- {
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
- return getDeploySetup(SimpleTopicMessageDrivenUnitTestCase.class,
- loader.getResource("messaging/test-destinations-full-service.xml").toString());
- }
-
}
Modified: trunk/testsuite/src/resources/messagedriven/jar/META-INF/ejb-jar.xml
===================================================================
--- trunk/testsuite/src/resources/messagedriven/jar/META-INF/ejb-jar.xml 2007-08-06 21:23:40 UTC (rev 64472)
+++ trunk/testsuite/src/resources/messagedriven/jar/META-INF/ejb-jar.xml 2007-08-07 04:27:44 UTC (rev 64473)
@@ -11,7 +11,8 @@
<ejb-name>TestMDB</ejb-name>
<ejb-class>org.jboss.test.messagedriven.beans.TestMessageDriven</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
- <transaction-type>${test.messagedriven.transactionType}</transaction-type>
+ <!-- <transaction-type>${test.messagedriven.transactionType}</transaction-type> TODO: place this back when http://jira.jboss.com/jira/browse/JBAS-4585 is done -->
+ <transaction-type>Container</transaction-type>
</message-driven>
<message-driven>
@@ -40,7 +41,8 @@
<ejb-name>TestMDB</ejb-name>
<method-name>*</method-name>
</method>
- <trans-attribute>${test.messagedriven.transactionAttribute}</trans-attribute>
+ <!-- <trans-attribute>${test.messagedriven.transactionAttribute}</trans-attribute> TODO: Place this back when http://jira.jboss.com/jira/browse/JBAS-4585 is done -->
+ <trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
More information about the jboss-cvs-commits
mailing list