diff options
| author | Alan Conway <aconway@apache.org> | 2011-06-30 11:54:40 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2011-06-30 11:54:40 +0000 |
| commit | afe7ad5d1af40b41b98dbc6d9c3d0e22b91f2a26 (patch) | |
| tree | 83bae97c591a3694becbea1b3cceafd9213034ca /qpid/cpp/src/tests/brokertest.py | |
| parent | 2e32a8dd1d548cc591cacaad3f7105e6a9521a18 (diff) | |
| download | qpid-python-afe7ad5d1af40b41b98dbc6d9c3d0e22b91f2a26.tar.gz | |
QPID-3329: Configure C++ client connections to replace url-addresses rather than merging new addresses with old
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1141493 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/brokertest.py')
| -rw-r--r-- | qpid/cpp/src/tests/brokertest.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/qpid/cpp/src/tests/brokertest.py b/qpid/cpp/src/tests/brokertest.py index 725bcaabaf..4a98c638a2 100644 --- a/qpid/cpp/src/tests/brokertest.py +++ b/qpid/cpp/src/tests/brokertest.py @@ -395,6 +395,8 @@ class Broker(Popen): class Cluster: """A cluster of brokers in a test.""" + # Client connection options for use in failover tests. + CONNECTION_OPTIONS = "reconnect:true,reconnect-timeout:10,reconnect-urls-replace:true" _cluster_count = 0 @@ -538,7 +540,8 @@ class NumberedSender(Thread): Thread to run a sender client and send numbered messages until stopped. """ - def __init__(self, broker, max_depth=None, queue="test-queue"): + def __init__(self, broker, max_depth=None, queue="test-queue", + connection_options=Cluster.CONNECTION_OPTIONS): """ max_depth: enable flow control, ensure sent - received <= max_depth. Requires self.notify_received(n) to be called each time messages are received. @@ -549,7 +552,7 @@ class NumberedSender(Thread): "--broker", "localhost:%s"%broker.port(), "--address", "%s;{create:always}"%queue, "--failover-updates", - "--connection-options", "{reconnect:true,reconnect-timeout:5}", + "--connection-options", "{%s}"%(connection_options), "--content-stdin" ], expect=EXPECT_RUNNING, @@ -600,7 +603,8 @@ class NumberedReceiver(Thread): Thread to run a receiver client and verify it receives sequentially numbered messages. """ - def __init__(self, broker, sender = None, queue="test-queue"): + def __init__(self, broker, sender = None, queue="test-queue", + connection_options=Cluster.CONNECTION_OPTIONS): """ sender: enable flow control. Call sender.received(n) for each message received. """ @@ -611,7 +615,7 @@ class NumberedReceiver(Thread): "--broker", "localhost:%s"%broker.port(), "--address", "%s;{create:always}"%queue, "--failover-updates", - "--connection-options", "{reconnect:true,reconnect-timeout:5}", + "--connection-options", "{%s}"%(connection_options), "--forever" ], expect=EXPECT_RUNNING, |
