mirror of https://github.com/apache/activemq.git
Fixed test.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@661719 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0d55a80a43
commit
47ea0980f0
|
@ -71,7 +71,8 @@ public class NetworkLoadTest extends TestCase {
|
||||||
private static final long SAMPLE_DURATION = Integer.parseInt(System.getProperty("SAMPLES_DURATION", "" + 1000 * 5));
|
private static final long SAMPLE_DURATION = Integer.parseInt(System.getProperty("SAMPLES_DURATION", "" + 1000 * 5));
|
||||||
protected static final int BROKER_COUNT = 4;
|
protected static final int BROKER_COUNT = 4;
|
||||||
protected static final int MESSAGE_SIZE = 2000;
|
protected static final int MESSAGE_SIZE = 2000;
|
||||||
|
String groupId;
|
||||||
|
|
||||||
class ForwardingClient {
|
class ForwardingClient {
|
||||||
|
|
||||||
private final AtomicLong forwardCounter = new AtomicLong();
|
private final AtomicLong forwardCounter = new AtomicLong();
|
||||||
|
@ -122,6 +123,7 @@ public class NetworkLoadTest extends TestCase {
|
||||||
|
|
||||||
|
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
|
groupId = "network-load-test-"+System.currentTimeMillis();
|
||||||
brokers = new BrokerService[BROKER_COUNT];
|
brokers = new BrokerService[BROKER_COUNT];
|
||||||
for (int i = 0; i < brokers.length; i++) {
|
for (int i = 0; i < brokers.length; i++) {
|
||||||
LOG.info("Starting broker: "+i);
|
LOG.info("Starting broker: "+i);
|
||||||
|
@ -201,7 +203,6 @@ public class NetworkLoadTest extends TestCase {
|
||||||
TransportConnector transportConnector = new TransportConnector();
|
TransportConnector transportConnector = new TransportConnector();
|
||||||
transportConnector.setUri(new URI("tcp://localhost:"+(60000+brokerId)));
|
transportConnector.setUri(new URI("tcp://localhost:"+(60000+brokerId)));
|
||||||
|
|
||||||
String groupId = "network-load-test-"+System.currentTimeMillis();
|
|
||||||
transportConnector.setDiscoveryUri(new URI("multicast://"+groupId));
|
transportConnector.setDiscoveryUri(new URI("multicast://"+groupId));
|
||||||
broker.addConnector(transportConnector);
|
broker.addConnector(transportConnector);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue