reduce the duration of this tests

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1207713 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2011-11-29 00:07:23 +00:00
parent 8e0cc676d8
commit c70952723c
3 changed files with 11 additions and 12 deletions

View File

@ -90,7 +90,7 @@ public class NegativeQueueTest extends AutoFailTestSupport {
private static final long MEMORY_USAGE = 400000000; private static final long MEMORY_USAGE = 400000000;
private static final long TEMP_USAGE = 200000000; private static final long TEMP_USAGE = 200000000;
private static final long STORE_USAGE = 1000000000; private static final long STORE_USAGE = 1000000000;
private static final int MESSAGE_COUNT = 2000; private static final int MESSAGE_COUNT = 1100;
protected static final boolean TRANSACTED = true; protected static final boolean TRANSACTED = true;
protected static final boolean DEBUG = true; protected static final boolean DEBUG = true;
@ -106,13 +106,13 @@ public class NegativeQueueTest extends AutoFailTestSupport {
blastAndConsume(); blastAndConsume();
} }
public void testWithDefaultPrefetchFiveConsumers() throws Exception{ public void x_testWithDefaultPrefetchFiveConsumers() throws Exception{
PREFETCH_SIZE = 1000; PREFETCH_SIZE = 1000;
NUM_CONSUMERS = 5; NUM_CONSUMERS = 5;
blastAndConsume(); blastAndConsume();
} }
public void testWithDefaultPrefetchTwoConsumers() throws Exception{ public void x_testWithDefaultPrefetchTwoConsumers() throws Exception{
PREFETCH_SIZE = 1000; PREFETCH_SIZE = 1000;
NUM_CONSUMERS = 2; NUM_CONSUMERS = 2;
blastAndConsume(); blastAndConsume();
@ -130,7 +130,7 @@ public class NegativeQueueTest extends AutoFailTestSupport {
blastAndConsume(); blastAndConsume();
} }
public void testWithSmallPrefetch() throws Exception{ public void x_testWithSmallPrefetch() throws Exception{
PREFETCH_SIZE = 10; PREFETCH_SIZE = 10;
NUM_CONSUMERS = 20; NUM_CONSUMERS = 20;
blastAndConsume(); blastAndConsume();

View File

@ -64,7 +64,7 @@ import org.slf4j.LoggerFactory;
*/ */
public class DurableConsumerTest extends CombinationTestSupport{ public class DurableConsumerTest extends CombinationTestSupport{
private static final Logger LOG = LoggerFactory.getLogger(DurableConsumerTest.class); private static final Logger LOG = LoggerFactory.getLogger(DurableConsumerTest.class);
private static int COUNT = 1024 * 10; private static int COUNT = 1024;
private static String CONSUMER_NAME = "DURABLE_TEST"; private static String CONSUMER_NAME = "DURABLE_TEST";
protected BrokerService broker; protected BrokerService broker;

View File

@ -187,7 +187,7 @@ public class PListTest {
final Vector<Throwable> exceptions = new Vector<Throwable>(); final Vector<Throwable> exceptions = new Vector<Throwable>();
final int iterations = 5000; final int iterations = 1000;
final int numLists = 10; final int numLists = 10;
final PList[] lists = new PList[numLists]; final PList[] lists = new PList[numLists];
@ -268,12 +268,11 @@ public class PListTest {
IOHelper.deleteChildren(directory); IOHelper.deleteChildren(directory);
store = new PListStore(); store = new PListStore();
store.setDirectory(directory); store.setDirectory(directory);
//store.setJournalMaxFileLength(1024*5);
store.start(); store.start();
final int numThreads = 20; final int numThreads = 20;
final int iterations = 2000; final int iterations = 1000;
executor = Executors.newFixedThreadPool(100); executor = Executors.newFixedThreadPool(100);
for (int i=0; i<numThreads; i++) { for (int i=0; i<numThreads; i++) {
new Job(i, PListTest.TaskType.ADD, iterations).run(); new Job(i, PListTest.TaskType.ADD, iterations).run();
@ -322,7 +321,7 @@ public class PListTest {
store.setCleanupInterval(5000); store.setCleanupInterval(5000);
store.start(); store.start();
final int iterations = 5000; final int iterations = 500;
final int numLists = 10; final int numLists = 10;
// prime the store // prime the store
@ -402,8 +401,8 @@ public class PListTest {
store.setDirectory(directory); store.setDirectory(directory);
store.start(); store.start();
final int iterations = 5000; final int iterations = 500;
final int numLists = 50; final int numLists = 10;
LOG.info("create"); LOG.info("create");
for (int i=0; i<numLists;i++) { for (int i=0; i<numLists;i++) {
@ -418,7 +417,7 @@ public class PListTest {
LOG.info("parallel add and remove"); LOG.info("parallel add and remove");
executor = Executors.newFixedThreadPool(400); executor = Executors.newFixedThreadPool(400);
final int numProducer = 5; final int numProducer = 5;
final int numConsumer = 50; final int numConsumer = 10;
for (int i=0; i<numLists; i++) { for (int i=0; i<numLists; i++) {
for (int j=0; j<numProducer; j++) { for (int j=0; j<numProducer; j++) {
executor.execute(new Job(i, PListTest.TaskType.ADD, iterations*2)); executor.execute(new Job(i, PListTest.TaskType.ADD, iterations*2));