Repository: qpid-dispatch Updated Branches: refs/heads/master 595277845 -> 592553d7c
DISPATCH-784: Add test that provokes the failure and demonstrates the fix Delivery annotations are called 'instructions'. Of course! Failure mode requires delivery and message annotations. Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/592553d7 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/592553d7 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/592553d7 Branch: refs/heads/master Commit: 592553d7c4d83ed6889ceacac1a21612f91ac8fb Parents: 5952778 Author: Chuck Rolke <[email protected]> Authored: Mon Jun 12 16:08:44 2017 -0400 Committer: Chuck Rolke <[email protected]> Committed: Mon Jun 12 16:13:49 2017 -0400 ---------------------------------------------------------------------- tests/system_tests_two_routers.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/592553d7/tests/system_tests_two_routers.py ---------------------------------------------------------------------- diff --git a/tests/system_tests_two_routers.py b/tests/system_tests_two_routers.py index 5e55b47..a954f21 100644 --- a/tests/system_tests_two_routers.py +++ b/tests/system_tests_two_routers.py @@ -1054,6 +1054,37 @@ class RouterTest(TestCase): self.assertEqual(None, test.error) + def test_16_delivery_annotations(self): + addr = "amqp:/delivery_annotations.1" + M1 = self.messenger() + M2 = self.messenger() + + M1.route("amqp:/*", self.routers[0].addresses[0]+"/$1") + M2.route("amqp:/*", self.routers[1].addresses[0]+"/$1") + M1.start() + M2.start() + M2.subscribe(addr) + + tm = Message() + rm = Message() + + self.routers[0].wait_address("delivery_annotations.1", 0, 1) + + tm.annotations = {'a1': 'a1', 'b1': 'b2'} + tm.address = addr + tm.instructions = {'work': 'hard', 'stay': 'humble'} + tm.body = {'number': 38} + M1.put(tm) + M1.send() + + M2.recv(1) + M2.get(rm) + self.assertEqual(38, rm.body['number']) + + M1.stop() + M2.stop() + + class Timeout(object): def __init__(self, parent): self.parent = parent --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
