Improvements on JDBC Test
This commit is contained in:
parent
7673c31083
commit
a5aa44670d
|
@ -26,14 +26,19 @@ import org.apache.activemq.artemis.core.journal.IOCompletion;
|
||||||
import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
|
import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
|
||||||
import org.apache.activemq.artemis.core.journal.RecordInfo;
|
import org.apache.activemq.artemis.core.journal.RecordInfo;
|
||||||
import org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl;
|
import org.apache.activemq.artemis.jdbc.store.journal.JDBCJournalImpl;
|
||||||
|
import org.apache.activemq.artemis.tests.util.ThreadLeakCheckRule;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
public class JDBCJournalTest {
|
public class JDBCJournalTest {
|
||||||
|
|
||||||
|
@Rule
|
||||||
|
public ThreadLeakCheckRule threadLeakCheckRule = new ThreadLeakCheckRule();
|
||||||
|
|
||||||
private static final String JOURNAL_TABLE_NAME = "MESSAGE_JOURNAL";
|
private static final String JOURNAL_TABLE_NAME = "MESSAGE_JOURNAL";
|
||||||
|
|
||||||
private JDBCJournalImpl journal;
|
private JDBCJournalImpl journal;
|
||||||
|
|
|
@ -59,7 +59,7 @@ public abstract class StorageManagerTestBase extends ActiveMQTestBase {
|
||||||
this.storeType = storeType;
|
this.storeType = storeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Parameterized.Parameters(name = "storeType")
|
@Parameterized.Parameters(name = "storeType={0}")
|
||||||
public static Collection<Object[]> data() {
|
public static Collection<Object[]> data() {
|
||||||
Object[][] params = new Object[][] {{StoreConfiguration.StoreType.FILE}, {StoreConfiguration.StoreType.DATABASE}};
|
Object[][] params = new Object[][] {{StoreConfiguration.StoreType.FILE}, {StoreConfiguration.StoreType.DATABASE}};
|
||||||
return Arrays.asList(params);
|
return Arrays.asList(params);
|
||||||
|
|
|
@ -93,6 +93,11 @@ public class BasicXaRecoveryTest extends ActiveMQTestBase {
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
|
if (storeType == StoreConfiguration.StoreType.DATABASE) {
|
||||||
|
Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
addressSettings.clear();
|
addressSettings.clear();
|
||||||
|
|
||||||
if (storeType == StoreConfiguration.StoreType.DATABASE) {
|
if (storeType == StoreConfiguration.StoreType.DATABASE) {
|
||||||
|
|
Loading…
Reference in New Issue