mirror of https://github.com/apache/activemq.git
no jira - fix intermittent test failure with two derby instanced in play in error
This commit is contained in:
parent
f155e92e58
commit
a0f4f1c93d
|
@ -686,7 +686,7 @@ public class JDBCPersistenceAdapter extends DataSourceServiceSupport implements
|
||||||
throw new IOException("isValid(10) failed for: " + connection);
|
throw new IOException("isValid(10) failed for: " + connection);
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
LOG.debug("Could not get JDBC connection for checkpoint: " + e);
|
LOG.debug("Could not get JDBC connection for checkpoint: " + e, e);
|
||||||
throw IOExceptionSupport.create(e);
|
throw IOExceptionSupport.create(e);
|
||||||
} finally {
|
} finally {
|
||||||
if (connection != null) {
|
if (connection != null) {
|
||||||
|
|
|
@ -45,6 +45,7 @@ public class DbRestartJDBCQueueMasterSlaveTest extends JDBCQueueMasterSlaveTest
|
||||||
LOG.info("STOPPING DB!@!!!!");
|
LOG.info("STOPPING DB!@!!!!");
|
||||||
final EmbeddedDataSource ds = ((SyncCreateDataSource)getExistingDataSource()).getDelegate();
|
final EmbeddedDataSource ds = ((SyncCreateDataSource)getExistingDataSource()).getDelegate();
|
||||||
ds.setShutdownDatabase("shutdown");
|
ds.setShutdownDatabase("shutdown");
|
||||||
|
ds.setCreateDatabase("not_any_more");
|
||||||
LOG.info("DB STOPPED!@!!!!");
|
LOG.info("DB STOPPED!@!!!!");
|
||||||
|
|
||||||
Thread dbRestartThread = new Thread("db-re-start-thread") {
|
Thread dbRestartThread = new Thread("db-re-start-thread") {
|
||||||
|
|
|
@ -106,6 +106,7 @@ public class DbRestartJDBCQueueTest extends JmsTopicSendReceiveWithTwoConnection
|
||||||
LOG.info("STOPPING DB!@!!!!");
|
LOG.info("STOPPING DB!@!!!!");
|
||||||
final EmbeddedDataSource ds = sharedDs;
|
final EmbeddedDataSource ds = sharedDs;
|
||||||
ds.setShutdownDatabase("shutdown");
|
ds.setShutdownDatabase("shutdown");
|
||||||
|
ds.setCreateDatabase("not_any_more");
|
||||||
try {
|
try {
|
||||||
ds.getConnection();
|
ds.getConnection();
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
|
|
Loading…
Reference in New Issue