summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-07-20 19:56:42 +0000
committerAlan Conway <aconway@apache.org>2010-07-20 19:56:42 +0000
commit92e9a95e0aeb7d42f02f610a91890b1517f3c20b (patch)
treeb89b7734a404d77cec0f0024ed26045d57fde34b /qpid/cpp/src/tests
parenteeab496104a9e759de9c8b574bd81f24ff5b9f23 (diff)
downloadqpid-python-92e9a95e0aeb7d42f02f610a91890b1517f3c20b.tar.gz
Fix bug in cluster with authentication: nodes exit with "unauthorized-access"
Adding a node to a cluster on which authentication is enabled and on which there are existing connections authenticated with mechanisms other than anonymous, may result in nodes exiting the cluster with inconsistent authorisation errors. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@965979 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
-rwxr-xr-xqpid/cpp/src/tests/cluster_tests.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/cluster_tests.py b/qpid/cpp/src/tests/cluster_tests.py
index 46bef2b3c2..06a8dcee50 100755
--- a/qpid/cpp/src/tests/cluster_tests.py
+++ b/qpid/cpp/src/tests/cluster_tests.py
@@ -157,6 +157,19 @@ acl allow all all
self.fail("Expected exception")
except messaging.exceptions.NotFound: pass
+ def test_user_id_update(self):
+ """Ensure that user-id of an open session is updated to new cluster members"""
+ sasl_config=os.path.join(self.rootdir, "sasl_config")
+ cluster = self.cluster(1, args=["--auth", "yes", "--sasl-config", sasl_config,])
+ c = cluster[0].connect(username="zig", password="zig")
+ s = c.session().sender("q;{create:always}")
+ s.send(Message("x", user_id="zig")) # Message sent before start new broker
+ cluster.start()
+ s.send(Message("y", user_id="zig")) # Messsage sent after start of new broker
+ # Verify brokers are healthy and messages are on the queue.
+ self.assertEqual("x", cluster[0].get_message("q").content)
+ self.assertEqual("y", cluster[1].get_message("q").content)
+
def test_link_events(self):
"""Regression test for https://bugzilla.redhat.com/show_bug.cgi?id=611543"""
args = ["--mgmt-pub-interval", 1] # Publish management information every second.