mirror of https://github.com/apache/activemq.git
updated some defaults
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@650930 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e9b1cd5282
commit
cbb290c0b3
|
@ -21,15 +21,12 @@ import javax.jms.DeliveryMode;
|
||||||
import javax.jms.Destination;
|
import javax.jms.Destination;
|
||||||
import javax.jms.JMSException;
|
import javax.jms.JMSException;
|
||||||
|
|
||||||
import org.apache.activemq.broker.BrokerService;
|
|
||||||
import org.apache.activemq.network.NetworkConnector;
|
|
||||||
|
|
||||||
|
|
||||||
public class SimpleDurableTopicNetworkTest extends SimpleNetworkTest {
|
public class SimpleDurableTopicNetworkTest extends SimpleNetworkTest {
|
||||||
|
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
numberofProducers=60;
|
numberofProducers=1;
|
||||||
numberOfConsumers=60;
|
numberOfConsumers=1;
|
||||||
samepleCount=1000;
|
samepleCount=1000;
|
||||||
playloadSize = 1024;
|
playloadSize = 1024;
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
|
@ -27,8 +27,8 @@ import javax.jms.JMSException;
|
||||||
public class SimpleDurableTopicTest extends SimpleTopicTest {
|
public class SimpleDurableTopicTest extends SimpleTopicTest {
|
||||||
|
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
numberOfDestinations=6;
|
numberOfDestinations=1;
|
||||||
numberOfConsumers = 1;
|
numberOfConsumers = 4;
|
||||||
numberofProducers = 1;
|
numberofProducers = 1;
|
||||||
samepleCount=1000;
|
samepleCount=1000;
|
||||||
playloadSize = 1024;
|
playloadSize = 1024;
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class SimpleNetworkTest extends SimpleTopicTest {
|
||||||
|
|
||||||
private static final Log LOG = LogFactory.getLog(SimpleNetworkTest.class);
|
private static final Log LOG = LogFactory.getLog(SimpleNetworkTest.class);
|
||||||
//protected String consumerBindAddress = "tcp://rexmac.home:61616?wireFormat.maxInactivityDuration=1000,tcp://localhost:61617?wireFormat.maxInactivityDuration=1000";
|
//protected String consumerBindAddress = "tcp://rexmac.home:61616?wireFormat.maxInactivityDuration=1000,tcp://localhost:61617?wireFormat.maxInactivityDuration=1000";
|
||||||
protected String consumerBindAddress = "tcp://rexmac.home:61616?wireFormat.maxInactivityDuration=1000&wireFormat.maxInactivityDurationInitalDelay=2000&socket.tcpNoDelayEnabled=false";
|
protected String consumerBindAddress = "tcp://localhost:61616";
|
||||||
protected String producerBindAddress = "tcp://localhost:61617";
|
protected String producerBindAddress = "tcp://localhost:61617";
|
||||||
protected static final String CONSUMER_BROKER_NAME = "Consumer";
|
protected static final String CONSUMER_BROKER_NAME = "Consumer";
|
||||||
protected static final String PRODUCER_BROKER_NAME = "Producer";
|
protected static final String PRODUCER_BROKER_NAME = "Producer";
|
||||||
|
@ -44,7 +44,7 @@ public class SimpleNetworkTest extends SimpleTopicTest {
|
||||||
|
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
if (consumerBroker == null) {
|
if (consumerBroker == null) {
|
||||||
// consumerBroker = createConsumerBroker(consumerBindAddress);
|
consumerBroker = createConsumerBroker(consumerBindAddress);
|
||||||
}
|
}
|
||||||
if (producerBroker == null) {
|
if (producerBroker == null) {
|
||||||
producerBroker = createProducerBroker(producerBindAddress);
|
producerBroker = createProducerBroker(producerBindAddress);
|
||||||
|
@ -69,7 +69,7 @@ public class SimpleNetworkTest extends SimpleTopicTest {
|
||||||
Destination destination = createDestination(session, destinationName+":"+k);
|
Destination destination = createDestination(session, destinationName+":"+k);
|
||||||
LOG.info("Testing against destination: " + destination);
|
LOG.info("Testing against destination: " + destination);
|
||||||
for (int i = 0; i < numberOfConsumers; i++) {
|
for (int i = 0; i < numberOfConsumers; i++) {
|
||||||
consumers[consumerCount] = createConsumer(factory, destination, consumerCount);
|
consumers[consumerCount] = createConsumer(consumerFactory, destination, consumerCount);
|
||||||
consumers[consumerCount].setSleepDuration(consumerSleepDuration);
|
consumers[consumerCount].setSleepDuration(consumerSleepDuration);
|
||||||
consumerCount++;
|
consumerCount++;
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ public class SimpleNetworkTest extends SimpleTopicTest {
|
||||||
for (int j = i; j < array.length; j++) {
|
for (int j = i; j < array.length; j++) {
|
||||||
array[j] = (byte)j;
|
array[j] = (byte)j;
|
||||||
}
|
}
|
||||||
producers[producerCount] = createProducer(factory, destination, i, array);
|
producers[producerCount] = createProducer(producerFactory, destination, i, array);
|
||||||
producerCount++;
|
producerCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,10 +133,10 @@ public class SimpleNetworkTest extends SimpleTopicTest {
|
||||||
//answer.setSplitSystemUsageForProducersConsumers(true);
|
//answer.setSplitSystemUsageForProducersConsumers(true);
|
||||||
answer.setPersistent(false);
|
answer.setPersistent(false);
|
||||||
answer.setDeleteAllMessagesOnStartup(true);
|
answer.setDeleteAllMessagesOnStartup(true);
|
||||||
NetworkConnector connector = answer.addNetworkConnector("static://tcp://rexmac.home:61616?wireFormat.maxInactivityDuration=2000");
|
NetworkConnector connector = answer.addNetworkConnector("static://"+consumerBindAddress);
|
||||||
//connector.setNetworkTTL(3);
|
//connector.setNetworkTTL(3);
|
||||||
//connector.setDynamicOnly(true);
|
//connector.setDynamicOnly(true);
|
||||||
//connector.setDuplex(true);
|
connector.setDuplex(true);
|
||||||
answer.addConnector(uri);
|
answer.addConnector(uri);
|
||||||
answer.setUseShutdownHook(false);
|
answer.setUseShutdownHook(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,8 +47,8 @@ public class SimpleTopicTest extends TestCase {
|
||||||
protected int samepleCount = 20;
|
protected int samepleCount = 20;
|
||||||
protected long sampleInternal = 10000;
|
protected long sampleInternal = 10000;
|
||||||
protected int numberOfDestinations=1;
|
protected int numberOfDestinations=1;
|
||||||
protected int numberOfConsumers = 10;
|
protected int numberOfConsumers = 1;
|
||||||
protected int numberofProducers = 10;
|
protected int numberofProducers = 1;
|
||||||
protected int totalNumberOfProducers;
|
protected int totalNumberOfProducers;
|
||||||
protected int totalNumberOfConsumers;
|
protected int totalNumberOfConsumers;
|
||||||
protected int playloadSize = 1024;
|
protected int playloadSize = 1024;
|
||||||
|
|
Loading…
Reference in New Issue