summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2013-09-09 17:08:39 +0000
committerAlan Conway <aconway@apache.org>2013-09-09 17:08:39 +0000
commit54f59af8956c9df2349c0030a3104ffc605b46c8 (patch)
tree8df90f9f8cabac07ae33e4b7558e82367669d2d6 /qpid/cpp/src/tests
parenteb985ca06c420450dfe04bf1e15124053d819e4b (diff)
downloadqpid-python-54f59af8956c9df2349c0030a3104ffc605b46c8.tar.gz
QPID-4327: HA support for TX transactions - fix TX error messages.
- Ignore un-replicated queues when replicating transactions. - Clean up cancel logic in QueueReplicator, causing "no such subscription" errors. - Remove unnecessary exchange delete warnings - ha_test.py: Shorter timeout for starting cluster brokers. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1521192 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
-rwxr-xr-xqpid/cpp/src/tests/ha_test.py4
-rwxr-xr-xqpid/cpp/src/tests/ha_tests.py11
2 files changed, 7 insertions, 8 deletions
diff --git a/qpid/cpp/src/tests/ha_test.py b/qpid/cpp/src/tests/ha_test.py
index 1c51673763..3280540db7 100755
--- a/qpid/cpp/src/tests/ha_test.py
+++ b/qpid/cpp/src/tests/ha_test.py
@@ -125,7 +125,7 @@ class HaBroker(Broker):
ha_port = ha_port or HaPort(test)
args = copy(args)
args += ["--load-module", BrokerTest.ha_lib,
- "--log-enable=debug+:ha::", "--log-enable=debug+:acl::",
+ "--log-enable=debug+:ha::",
# Non-standard settings for faster tests.
"--link-maintenance-interval=0.1",
# Heartbeat and negotiate time are needed so that a broker wont
@@ -323,7 +323,7 @@ class HaCluster(object):
ha_port = self._ports[i]
b = HaBroker(ha_port.test, ha_port, brokers_url=self.url, name=name,
args=args, **self.kwargs)
- b.ready()
+ b.ready(timeout=5)
return b
def start(self):
diff --git a/qpid/cpp/src/tests/ha_tests.py b/qpid/cpp/src/tests/ha_tests.py
index 79f068641d..17a60a2c76 100755
--- a/qpid/cpp/src/tests/ha_tests.py
+++ b/qpid/cpp/src/tests/ha_tests.py
@@ -562,8 +562,7 @@ class ReplicationTests(HaBrokerTest):
return
acl=os.path.join(os.getcwd(), "policy.acl")
aclf=file(acl,"w")
- # Verify that replication works with auth=yes and HA user has at least the following
- # privileges:
+ # Minimum set of privileges required for the HA user.
aclf.write("""
# HA user
acl allow zag@QPID access queue
@@ -592,14 +591,14 @@ acl deny all all
client_credentials=Credentials("zag", "zag", "PLAIN"))
c = cluster[0].connect(username="zig", password="zig")
s0 = c.session();
- s0.receiver("q;{create:always}")
- s0.receiver("ex;{create:always,node:{type:topic,x-declare:{type:'fanout'},x-bindings:[{exchange:'ex',queue:'q'}]}}")
+ s0.sender("q;{create:always}")
+ s0.sender("ex;{create:always,node:{type:topic,x-declare:{type:'fanout'},x-bindings:[{exchange:'ex',queue:'q'}]}}")
s0.sender("ex").send("foo");
s1 = c.session(transactional=True)
- s1.sender("ex").send("tx");
+ s1.sender("ex").send("foo-tx");
cluster[1].assert_browse_backup("q", ["foo"])
s1.commit()
- cluster[1].assert_browse_backup("q", ["foo", "tx"])
+ cluster[1].assert_browse_backup("q", ["foo", "foo-tx"])
def test_alternate_exchange(self):
"""Verify that alternate-exchange on exchanges and queues is propagated