I'd also recommend that most tests bootstrap
a default configuration for the server.
The default Microcontainer delegate looks for an xml file
based on the test class name.
e.g.
org.jboss.test.jms.test.TestSomething.class
uses
org.jboss.test.jms.test.TestSomething.xml
Rather than writing one for each test, there should be
a mechanism to provide a default JMS config
(while still allowing individual tests to use different configurations).
e.g. maybe?
| public class JMSTestDelegate extends MicrocontainerTestDelegate
| {
| static JMSAdmin admin;
|
| ...
|
| protected void setUp() throws Execption
| {
| super.setUp();
|
| // No test specific configuration?
| if (getBean("ConnectionFactory") == null)
| {
| String name = admin.getDefaultConfigName();
| URL url = clazz.getResource(name); // the config will be in the classpath
| deploy(url);
| }
| }
| }
|
Or perhaps:
| protected void setUp() throws Execption
| {
| super.setUp();
|
|
| String name = admin.getConfig(clazz.getName());
| // No test specific configuration?
| if (name == null)
| name = admin.getDefaultConfigName();
| URL url = clazz.getResource(name); // the config will be in the classpath
| deploy(url);
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975123#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...