mirror of https://github.com/apache/activemq.git
reduce test duration, relax derbydb durability - AMQ5266SingleDestTest
This commit is contained in:
parent
95f7262cb1
commit
25376afac1
|
@ -183,7 +183,9 @@ public abstract class TestSupport extends CombinationTestSupport {
|
|||
PersistenceAdapter adapter = null;
|
||||
switch (choice) {
|
||||
case JDBC:
|
||||
adapter = new JDBCPersistenceAdapter();
|
||||
JDBCPersistenceAdapter jdbcPersistenceAdapter = new JDBCPersistenceAdapter();
|
||||
jdbcPersistenceAdapter.setUseLock(false); // rollback (at shutdown) on derby can take a long time with file io etc
|
||||
adapter = jdbcPersistenceAdapter;
|
||||
break;
|
||||
case KahaDB:
|
||||
adapter = new KahaDBPersistenceAdapter();
|
||||
|
@ -196,7 +198,7 @@ public abstract class TestSupport extends CombinationTestSupport {
|
|||
break;
|
||||
}
|
||||
broker.setPersistenceAdapter(adapter);
|
||||
adapter.setDirectory(broker.getBrokerDataDirectory());
|
||||
adapter.setDirectory(new File(broker.getBrokerDataDirectory(), choice.name()));
|
||||
return adapter;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@ import org.apache.activemq.broker.region.policy.PolicyMap;
|
|||
import org.apache.activemq.command.ActiveMQQueue;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Parameterized;
|
||||
|
@ -97,6 +98,11 @@ public class AMQ5266SingleDestTest {
|
|||
|
||||
public int consumerBatchSize = 25;
|
||||
|
||||
@BeforeClass
|
||||
public static void derbyTestMode() throws Exception {
|
||||
System.setProperty("derby.system.durability","test");
|
||||
}
|
||||
|
||||
@Before
|
||||
public void startBroker() throws Exception {
|
||||
brokerService = new BrokerService();
|
||||
|
|
Loading…
Reference in New Issue