From 2b382c2ab784f310d0ed36825668a6368f22a668 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 17 Oct 2007 13:45:27 +0000 Subject: Fix to headers exchanges bind: need to check the match value is present before dereferencing Added tests for this. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@585503 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/tests_0-10/exchange.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'qpid/python') diff --git a/qpid/python/tests_0-10/exchange.py b/qpid/python/tests_0-10/exchange.py index 4d8b254df7..86c39b7736 100644 --- a/qpid/python/tests_0-10/exchange.py +++ b/qpid/python/tests_0-10/exchange.py @@ -325,3 +325,11 @@ class MiscellaneousErrorsTests(TestBase): c2.session_open() c2.exchange_delete(exchange="test_different_declared_type_exchange") +class ExchangeTests(TestBase): + def testHeadersBindNoMatchArg(self): + self.channel.queue_declare(queue="q", exclusive=True, auto_delete=True) + try: + self.channel.queue_bind(queue="q", exchange="amq.match", arguments={"name":"fred" , "age":3} ) + self.fail("Expected failure for missing x-match arg.") + except Closed, e: + self.assertConnectionException(541, e.args[0]) -- cgit v1.2.1