[jboss-cvs] JBossAS SVN: r109295 - in trunk/testsuite: src/main/org/jboss/test/mdb/test and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Nov 12 07:17:42 EST 2010
Author: alesj
Date: 2010-11-12 07:17:41 -0500 (Fri, 12 Nov 2010)
New Revision: 109295
Modified:
trunk/testsuite/imports/sections/mdb.xml
trunk/testsuite/src/main/org/jboss/test/mdb/test/MDBUnitTestCase.java
Log:
Fix the naming.
Wrap hornetq xml files in a jar -- as we're not testing naming, this should be just fine.
Modified: trunk/testsuite/imports/sections/mdb.xml
===================================================================
--- trunk/testsuite/imports/sections/mdb.xml 2010-11-12 11:20:36 UTC (rev 109294)
+++ trunk/testsuite/imports/sections/mdb.xml 2010-11-12 12:17:41 UTC (rev 109295)
@@ -16,6 +16,13 @@
</fileset>
</jar>
+ <!-- wrap hornetq xml files -->
+ <jar destfile="${build.lib}/hornetq-xmls.jar">
+ <fileset dir="${build.resources}/hornetq">
+ <include name="**/*.xml"/>
+ </fileset>
+ </jar>
+
<!-- build mdb.jar -->
<jar destfile="${build.lib}/mdb.jar">
<fileset dir="${build.classes}">
Modified: trunk/testsuite/src/main/org/jboss/test/mdb/test/MDBUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/mdb/test/MDBUnitTestCase.java 2010-11-12 11:20:36 UTC (rev 109294)
+++ trunk/testsuite/src/main/org/jboss/test/mdb/test/MDBUnitTestCase.java 2010-11-12 12:17:41 UTC (rev 109295)
@@ -21,30 +21,16 @@
*/
package org.jboss.test.mdb.test;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.jms.TopicConnection;
-import javax.jms.TopicConnectionFactory;
-import javax.jms.TopicPublisher;
-import javax.jms.TopicSession;
-import javax.management.ObjectName;
+import javax.jms.*;
import javax.naming.NamingException;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
import org.jboss.test.JBossJMSTestCase;
-import org.jboss.test.JBossTestCase;
import org.jboss.test.JBossTestSetup;
import org.jboss.test.mdb.bean.CustomMessage;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
/**
* Some simple tests of MDB. These could be much more elaborated.
* These are also largely useless as they don't validate that the mdb
@@ -277,17 +263,14 @@
protected void setUp() throws Exception
{
super.setUp();
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
MDBUnitTestCase.deployQueue("testObjectMessage");
- deploy(loader.getResource("hornetq/hornetq-jms.xml").toString());
- deploy(loader.getResource("hornetq/hornetq-queues.xml").toString());
+ deploy("hornetq-xmls.jar");
deploy("mdb.jar");
}
protected void tearDown() throws Exception
{
super.tearDown();
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
try
{
undeploy("mdb.jar");
@@ -298,20 +281,12 @@
}
try
{
- undeploy(loader.getResource("hornetq/hornetq-jms.xml").toString());
+ undeploy("hornetq-xmls.jar");
}
catch (Exception ignored)
{
- getLog().warn("Unable to undeploy hornetq/hornetq-jms.xml", ignored);
+ getLog().warn("Unable to undeploy hornetq-xmls.jar", ignored);
}
- try
- {
- undeploy(loader.getResource("hornetq/hornetq-queues.xml").toString());
- }
- catch (Exception ignored)
- {
- getLog().warn("Unable to undeploy hornetq/hornetq-jms.xml", ignored);
- }
MDBUnitTestCase.undeployDestinations();
}
};
More information about the jboss-cvs-commits
mailing list