Exemplo n.º 1
0
    def _test_create_worker(self, topology_version=1):
        self.config(qpid_topology_version=topology_version)

        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        if topology_version == 1:
            expected_address = (
                'openstack/impl_qpid_test ; {"node": {"x-declare": '
                '{"auto-delete": true, "durable": true}, "type": "topic"}, '
                '"create": "always", "link": {"x-declare": {"auto-delete": '
                'false, "exclusive": false, "durable": false}, "durable": '
                'true, "name": "impl.qpid.test.workers"}}')
        elif topology_version == 2:
            expected_address = (
                'amq.topic/topic/openstack/impl_qpid_test ; '
                '{"link": {"x-declare": '
                '{"auto-delete": false, "exclusive": false, '
                '"durable": false}, "name": "impl.qpid.test.workers"}}')
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(self.FLAGS)
        connection.create_worker("impl_qpid_test",
                                 lambda *_x, **_y: None,
                                 'impl.qpid.test.workers',
                                 )
        connection.close()
Exemplo n.º 2
0
    def test_topic_consumer(self):
        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        expected_address = (
            'foobar/impl_qpid_test ; {"node": {"x-declare": '
            '{"auto-delete": true, "durable": true}, "type": "topic"}, '
            '"create": "always", "link": {"x-declare": {"auto-delete": '
            'true, "exclusive": false, "durable": false}, "durable": '
            'true, "name": "impl.qpid.test.workers"}}')
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(FLAGS)
        connection.declare_topic_consumer("impl_qpid_test",
                                          lambda *_x, **_y: None,
                                          queue_name='impl.qpid.test.workers',
                                          exchange_name='foobar')
        connection.close()
Exemplo n.º 3
0
    def test_join_consumer_pool(self):
        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        expected_address = (
            'exchange-name/impl_qpid_test ; {"node": {"x-declare": '
            '{"auto-delete": true, "durable": true}, "type": "topic"}, '
            '"create": "always", "link": {"x-declare": {"auto-delete": '
            'true, "exclusive": false, "durable": false}, "durable": '
            'true, "name": "impl.qpid.test.consumer.pool"}}')
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(FLAGS)
        connection.join_consumer_pool(
            callback=lambda *_x, **_y: None,
            pool_name='impl.qpid.test.consumer.pool',
            topic="impl_qpid_test",
            exchange_name='exchange-name',
        )
        connection.close()
Exemplo n.º 4
0
    def test_auto_delete(self):
        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        expected_address = (
            'openstack/impl_qpid_auto_delete ; {"node": {"x-declare": '
            '{"auto-delete": true, "durable": true}, "type": "topic"}, '
            '"create": "always", "link": {"x-declare": {"auto-delete": '
            'true, "exclusive": false, "durable": false}, "durable": '
            'true, "name": "impl_qpid_auto_delete"}}')
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        self.config(amqp_auto_delete=True)
        connection = impl_qpid.create_connection(self.FLAGS)
        connection.create_consumer("impl_qpid_auto_delete",
                                   lambda *_x, **_y: None)
        connection.close()
Exemplo n.º 5
0
    def _test_create_consumer(self, fanout):
        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        if fanout:
            # The link name includes a UUID, so match it with a regex.
            expected_address = mox.Regex(
                r'^impl_qpid_test_fanout ; '
                '{"node": {"x-declare": {"auto-delete": true, "durable": '
                'false, "type": "fanout"}, "type": "topic"}, "create": '
                '"always", "link": {"x-declare": {"auto-delete": true, '
                '"exclusive": true, "durable": false}, "durable": true, '
                '"name": "impl_qpid_test_fanout_.*"}}$')
        else:
            expected_address = (
                'openstack/impl_qpid_test ; {"node": {"x-declare": '
                '{"auto-delete": true, "durable": true}, "type": "topic"}, '
                '"create": "always", "link": {"x-declare": {"auto-delete": '
                'true, "exclusive": false, "durable": false}, "durable": '
                'true, "name": "impl_qpid_test"}}')
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(FLAGS)
        connection.create_consumer("impl_qpid_test", lambda *_x, **_y: None,
                                   fanout)
        connection.close()
Exemplo n.º 6
0
    def test_topic_consumer(self):
        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        expected_address = (
            'foobar/impl_qpid_test ; {"node": {"x-declare": '
            '{"auto-delete": true, "durable": true}, "type": "topic"}, '
            '"create": "always", "link": {"x-declare": {"auto-delete": '
            'true, "exclusive": false, "durable": false}, "durable": '
            'true, "name": "impl.qpid.test.workers"}}')
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(FLAGS)
        connection.declare_topic_consumer("impl_qpid_test",
                                          lambda *_x, **_y: None,
                                          queue_name='impl.qpid.test.workers',
                                          exchange_name='foobar')
        connection.close()
Exemplo n.º 7
0
    def _test_create_worker(self, topology_version=1):
        self.config(qpid_topology_version=topology_version)

        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        if topology_version == 1:
            expected_address = (
                'openstack/impl_qpid_test ; {"node": {"x-declare": '
                '{"auto-delete": true, "durable": true}, "type": "topic"}, '
                '"create": "always", "link": {"x-declare": {"auto-delete": '
                'false, "exclusive": false, "durable": false}, "durable": '
                'true, "name": "impl.qpid.test.workers"}}')
        elif topology_version == 2:
            expected_address = ('amq.topic/topic/openstack/impl_qpid_test ; '
                                '{"link": {"x-declare": '
                                '{"auto-delete": false, "durable": false}}}')
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(self.FLAGS)
        connection.create_worker(
            "impl_qpid_test",
            lambda *_x, **_y: None,
            'impl.qpid.test.workers',
        )
        connection.close()
Exemplo n.º 8
0
    def test_fanout_reconnect(self):
        expected_address = (
            'impl_qpid_test_fanout ; '
            '{"node": {"x-declare": {"auto-delete": true, "durable": '
            'false, "type": "fanout"}, "type": "topic"}, "create": '
            '"always", "link": {"x-declare": {"auto-delete": true, '
            '"exclusive": true, "durable": false}, "durable": true}}')
        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        # First connection and create_consumer
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1

        # Now call reconnect
        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(self.FLAGS)
        connection.create_consumer("impl_qpid_test",
                                   None,
                                   True)
        connection.reconnect()
        connection.close()
Exemplo n.º 9
0
    def test_join_consumer_pool(self):
        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        expected_address = (
            'exchange-name/impl_qpid_test ; {"node": {"x-declare": '
            '{"auto-delete": true, "durable": true}, "type": "topic"}, '
            '"create": "always", "link": {"x-declare": {"auto-delete": '
            'true, "exclusive": false, "durable": false}, "durable": '
            'true, "name": "impl.qpid.test.consumer.pool"}}')
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(FLAGS)
        connection.join_consumer_pool(
            callback=lambda *_x, **_y: None,
            pool_name='impl.qpid.test.consumer.pool',
            topic="impl_qpid_test",
            exchange_name='exchange-name',
        )
        connection.close()
Exemplo n.º 10
0
    def _test_create_consumer(self, fanout):
        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        if fanout:
            # The link name includes a UUID, so match it with a regex.
            expected_address = mox.Regex(r'^impl_qpid_test_fanout ; '
                '{"node": {"x-declare": {"auto-delete": true, "durable": '
                'false, "type": "fanout"}, "type": "topic"}, "create": '
                '"always", "link": {"x-declare": {"auto-delete": true, '
                '"exclusive": true, "durable": false}, "durable": true, '
                '"name": "impl_qpid_test_fanout_.*"}}$')
        else:
            expected_address = ('nova/impl_qpid_test ; {"node": {"x-declare": '
                '{"auto-delete": true, "durable": true}, "type": "topic"}, '
                '"create": "always", "link": {"x-declare": {"auto-delete": '
                'true, "exclusive": false, "durable": false}, "durable": '
                'true, "name": "impl_qpid_test"}}')
        self.mock_session.receiver(expected_address).AndReturn(
                                                        self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(FLAGS)
        connection.create_consumer("impl_qpid_test",
                                   lambda *_x, **_y: None,
                                   fanout)
        connection.close()
Exemplo n.º 11
0
    def test_auto_delete(self):
        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        expected_address = (
            'openstack/impl_qpid_auto_delete ; {"node": {"x-declare": '
            '{"auto-delete": true, "durable": true}, "type": "topic"}, '
            '"create": "always", "link": {"x-declare": {"auto-delete": '
            'true, "exclusive": false, "durable": false}, "durable": '
            'true, "name": "impl_qpid_auto_delete"}}')
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        self.config(amqp_auto_delete=True)
        connection = impl_qpid.create_connection(self.FLAGS)
        connection.create_consumer("impl_qpid_auto_delete",
                                   lambda *_x, **_y: None)
        connection.close()
Exemplo n.º 12
0
    def test_create_connection(self):
        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)

        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(self.FLAGS)
        connection.close()
Exemplo n.º 13
0
    def test_create_connection(self):
        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)

        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(FLAGS)
        connection.close()
Exemplo n.º 14
0
    def _test_create_consumer(self, fanout, topology_version=1):
        self.config(qpid_topology_version=topology_version)

        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        if fanout:
            # The link name includes a UUID, so match it with a regex.
            if topology_version == 1:
                expected_address = (
                    'impl_qpid_test_fanout ; '
                    '{"node": {"x-declare": {"auto-delete": true, "durable": '
                    'false, "type": "fanout"}, "type": "topic"}, "create": '
                    '"always", "link": {"x-declare": {"auto-delete": true, '
                    '"exclusive": true, "durable": false}, "durable": true}}')
            elif topology_version == 2:
                expected_address = (
                    'amq.topic/fanout/impl_qpid_test ; {"link": '
                    '{"x-declare": {"auto-delete": true, '
                    '"exclusive": true}}}')
        else:
            if topology_version == 1:
                expected_address = (
                    'openstack/impl_qpid_test ; {"node": {"x-declare": '
                    '{"auto-delete": true, "durable": true}, '
                    '"type": "topic"}, "create": "always", '
                    '"link": {"x-declare": {"auto-delete": '
                    'false, "exclusive": false, "durable": false}, "durable": '
                    'true, "name": "impl_qpid_test"}}')
            elif topology_version == 2:
                expected_address = (
                    'amq.topic/topic/openstack/impl_qpid_test ; {"link": '
                    '{"x-declare": {"auto-delete": false, '
                    '"exclusive": false, "durable": false}, '
                    '"name": "impl_qpid_test"}}')
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(self.FLAGS)
        connection.create_consumer("impl_qpid_test",
                                   lambda *_x, **_y: None,
                                   fanout)
        connection.close()
Exemplo n.º 15
0
    def _test_topic_consumer(self, consume_thread_exc=False,
                             topology_version=1):
        self.config(qpid_topology_version=topology_version)

        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        if topology_version == 1:
            expected_address = (
                'foobar/impl_qpid_test ; {"node": {"x-declare": '
                '{"auto-delete": true, "durable": true}, "type": "topic"}, '
                '"create": "always", "link": {"x-declare": {"auto-delete": '
                'false, "exclusive": false, "durable": false}, "durable": '
                'true, "name": "impl.qpid.test.workers"}}')
        elif topology_version == 2:
            expected_address = (
                'amq.topic/topic/foobar/impl_qpid_test ; '
                '{"link": {"x-declare":'
                ' {"auto-delete": false, "exclusive": false, '
                '"durable": false}, "name": "impl.qpid.test.workers"}}')
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        if consume_thread_exc:
            self.mock_session.next_receiver(timeout=None).AndRaise(
                Exception('unexpected exception'))
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(self.FLAGS)
        connection.declare_topic_consumer("impl_qpid_test",
                                          lambda *_x, **_y: None,
                                          queue_name='impl.qpid.test.workers',
                                          exchange_name='foobar')
        if consume_thread_exc:
            connection.consume_in_thread()
            time.sleep(0)
        connection.close()
Exemplo n.º 16
0
    def _test_topic_consumer(self,
                             consume_thread_exc=False,
                             topology_version=1):
        self.config(qpid_topology_version=topology_version)

        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        if topology_version == 1:
            expected_address = (
                'foobar/impl_qpid_test ; {"node": {"x-declare": '
                '{"auto-delete": true, "durable": true}, "type": "topic"}, '
                '"create": "always", "link": {"x-declare": {"auto-delete": '
                'false, "exclusive": false, "durable": false}, "durable": '
                'true, "name": "impl.qpid.test.workers"}}')
        elif topology_version == 2:
            expected_address = ('amq.topic/topic/foobar/impl_qpid_test ; '
                                '{"link": {"x-declare":'
                                ' {"auto-delete": false, "durable": false}}}')
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        if consume_thread_exc:
            self.mock_session.next_receiver(timeout=None).AndRaise(
                Exception('unexpected exception'))
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(self.FLAGS)
        connection.declare_topic_consumer("impl_qpid_test",
                                          lambda *_x, **_y: None,
                                          queue_name='impl.qpid.test.workers',
                                          exchange_name='foobar')
        if consume_thread_exc:
            connection.consume_in_thread()
            time.sleep(0)
        connection.close()
Exemplo n.º 17
0
    def test_fanout_reconnect(self):
        expected_address = mox.Regex(
            r'^impl_qpid_test_fanout ; '
            '{"node": {"x-declare": {"auto-delete": true, "durable": '
            'false, "type": "fanout"}, "type": "topic"}, "create": '
            '"always", "link": {"x-declare": {"auto-delete": true, '
            '"exclusive": true, "durable": false}, "durable": true, '
            '"name": "impl_qpid_test_fanout_.*"}}$')
        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        # First connection and create_consumer
        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1

        # Now call reconnect
        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        # FIXME(wilsonmh): connect is currently part of __init__(),
        #                 causing a reconnect to declare two receivers :(
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(self.FLAGS)
        connection.create_consumer("impl_qpid_test",
                                   None,
                                   True)
        connection.reconnect()
        connection.close()
Exemplo n.º 18
0
    def test_fanout_reconnect(self):
        expected_address = mox.Regex(
            r'^impl_qpid_test_fanout ; '
            '{"node": {"x-declare": {"auto-delete": true, "durable": '
            'false, "type": "fanout"}, "type": "topic"}, "create": '
            '"always", "link": {"x-declare": {"auto-delete": true, '
            '"exclusive": true, "durable": false}, "durable": true, '
            '"name": "impl_qpid_test_fanout_.*"}}$')
        self.mock_connection = self.mox.CreateMock(self.orig_connection)
        self.mock_session = self.mox.CreateMock(self.orig_session)
        self.mock_receiver = self.mox.CreateMock(self.orig_receiver)

        # First connection and create_consumer
        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1

        # Now call reconnect
        self.mock_connection.opened().AndReturn(False)
        self.mock_connection.open()
        self.mock_connection.session().AndReturn(self.mock_session)
        # FIXME(wilsonmh): connect is currently part of __init__(),
        #                 causing a reconnect to declare two receivers :(
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_session.receiver(expected_address).AndReturn(
            self.mock_receiver)
        self.mock_receiver.capacity = 1
        self.mock_connection.close()

        self.mox.ReplayAll()

        connection = impl_qpid.create_connection(self.FLAGS)
        connection.create_consumer("impl_qpid_test", None, True)
        connection.reconnect()
        connection.close()