diff options
| author | Alan Conway <aconway@apache.org> | 2013-02-07 19:26:12 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2013-02-07 19:26:12 +0000 |
| commit | 88613594a4bfa64c5f244ce2d183d605449e2496 (patch) | |
| tree | 4e475fbdd91e5eff2672dcc045709f3626fb2550 /qpid/cpp/src/tests/ha_tests.py | |
| parent | 2f8518477686ce2382110d159349fe732db27a1a (diff) | |
| download | qpid-python-88613594a4bfa64c5f244ce2d183d605449e2496.tar.gz | |
QPID-4555: HA Primary sets explicit qpid.replicate in Queue and Exchange arguments.
Previously both Primary and Backup would calculate the qpid.replicate value
independently, assuming the result would be the same. In the case of exclusive
queues, the exclusivity can change over time so its possible that primary and
backup won't agree.
Now only Primary does the calculation with exclusive, auto-delete etc. and puts
an explicity qpid.replicate in the queue or event arguments. Backup uses the
value set by primary.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1443678 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/ha_tests.py')
| -rwxr-xr-x | qpid/cpp/src/tests/ha_tests.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/qpid/cpp/src/tests/ha_tests.py b/qpid/cpp/src/tests/ha_tests.py index 3261e34085..587a150dda 100755 --- a/qpid/cpp/src/tests/ha_tests.py +++ b/qpid/cpp/src/tests/ha_tests.py @@ -702,15 +702,17 @@ acl deny all all s.sender("e1;{create:always, node:{type:topic}}") # cluster[1] will be the backup, has extra queues/exchanges + xdecl = "x-declare:{arguments:{'qpid.replicate':'all'}}" + node = "node:{%s}"%(xdecl) s = cluster[1].connect_admin().session() - s.sender("q1;{create:always}") - s.sender("q2;{create:always}") - s.sender("e1;{create:always, node:{type:topic}}") - s.sender("e2;{create:always, node:{type:topic}}") + s.sender("q1;{create:always, %s}"%(node)) + s.sender("q2;{create:always, %s}"%(node)) + s.sender("e1;{create:always, node:{type:topic, %s}}"%(xdecl)) + s.sender("e2;{create:always, node:{type:topic, %s}}"%(xdecl)) for a in ["q1", "q2", "e1", "e2"]: cluster[1].wait_backup(a) cluster[0].promote() - # Verify the backup deletes the surpluis queue and exchange + # Verify the backup deletes the surplus queue and exchange cluster[1].wait_status("ready") s = cluster[1].connect_admin().session() self.assertRaises(NotFound, s.receiver, ("q2")); @@ -868,12 +870,14 @@ acl deny all all # Simulate the race by re-creating the objects before promoting the new primary cluster.kill(0, False) + xdecl = "x-declare:{arguments:{'qpid.replicate':'all'}}" + node = "node:{%s}"%(xdecl) sn = cluster[1].connect_admin().session() sn.sender("qq;{delete:always}").close() - s = sn.sender("qq;{create:always}") + s = sn.sender("qq;{create:always, %s}"%(node)) s.send("foo") sn.sender("xx;{delete:always}").close() - sn.sender("xx;{create:always,node:{type:topic}}") + sn.sender("xx;{create:always,node:{type:topic,%s}}"%(xdecl)) cluster[1].promote() cluster[1].wait_status("active") # Verify we are not still using the old objects on cluster[2] |
