mirror of https://github.com/apache/activemq.git
try and ensure derby shutsdown between tests
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1050345 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
72bf2f85cc
commit
6983978564
|
@ -41,11 +41,12 @@ import org.apache.derby.jdbc.EmbeddedDataSource;
|
|||
public class JDBCMessagePriorityTest extends MessagePriorityTest {
|
||||
|
||||
private static final Log LOG = LogFactory.getLog(JDBCMessagePriorityTest.class);
|
||||
EmbeddedDataSource dataSource;
|
||||
|
||||
@Override
|
||||
protected PersistenceAdapter createPersistenceAdapter(boolean delete) throws Exception {
|
||||
JDBCPersistenceAdapter jdbc = new JDBCPersistenceAdapter();
|
||||
EmbeddedDataSource dataSource = new EmbeddedDataSource();
|
||||
dataSource = new EmbeddedDataSource();
|
||||
dataSource.setDatabaseName("derbyDb");
|
||||
dataSource.setCreateDatabase("create");
|
||||
dataSource.setShutdownDatabase("false");
|
||||
|
@ -55,6 +56,17 @@ public class JDBCMessagePriorityTest extends MessagePriorityTest {
|
|||
return jdbc;
|
||||
}
|
||||
|
||||
|
||||
protected void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
try {
|
||||
dataSource.setShutdownDatabase("true");
|
||||
dataSource.getConnection();
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// this cannot be a general test as kahaDB just has support for 3 priority levels
|
||||
public void testDurableSubsReconnectWithFourLevels() throws Exception {
|
||||
ActiveMQTopic topic = (ActiveMQTopic) sess.createTopic("TEST");
|
||||
|
|
Loading…
Reference in New Issue