reduce test duration, relax derbydb durability - AMQ5266SingleDestTest

Conflicts:
	activemq-unit-tests/src/test/java/org/apache/activemq/TestSupport.java
This commit is contained in:
gtully 2015-02-11 15:27:45 +00:00 committed by Hadrian Zbarcea
parent 9b2a6dcbb1
commit b4e6cb6af5
2 changed files with 10 additions and 1 deletions

View File

@ -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,6 +198,7 @@ public abstract class TestSupport extends CombinationTestSupport {
break;
}
broker.setPersistenceAdapter(adapter);
adapter.setDirectory(new File(broker.getBrokerDataDirectory(), choice.name()));
return adapter;
}

View File

@ -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();