no jira - fix intermittent test failure with two derby instanced in play in error

This commit is contained in:
gtully 2019-09-04 17:14:37 +01:00
parent f155e92e58
commit a0f4f1c93d
3 changed files with 3 additions and 1 deletions

View File

@ -686,7 +686,7 @@ public class JDBCPersistenceAdapter extends DataSourceServiceSupport implements
throw new IOException("isValid(10) failed for: " + connection);
}
} 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);
} finally {
if (connection != null) {

View File

@ -45,6 +45,7 @@ public class DbRestartJDBCQueueMasterSlaveTest extends JDBCQueueMasterSlaveTest
LOG.info("STOPPING DB!@!!!!");
final EmbeddedDataSource ds = ((SyncCreateDataSource)getExistingDataSource()).getDelegate();
ds.setShutdownDatabase("shutdown");
ds.setCreateDatabase("not_any_more");
LOG.info("DB STOPPED!@!!!!");
Thread dbRestartThread = new Thread("db-re-start-thread") {

View File

@ -106,6 +106,7 @@ public class DbRestartJDBCQueueTest extends JmsTopicSendReceiveWithTwoConnection
LOG.info("STOPPING DB!@!!!!");
final EmbeddedDataSource ds = sharedDs;
ds.setShutdownDatabase("shutdown");
ds.setCreateDatabase("not_any_more");
try {
ds.getConnection();
} catch (Exception ignored) {