From 3314a5cb4d14e94ed8fa29a1ba6348d10d27fdcf Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Wed, 22 Feb 2012 16:41:55 +0000 Subject: QPID-3851 - Unified common CLI options for qpid-config and qpid-stat. Also in this commit: qpid-config was converted to use the messaging-based qmf2 library. It no longer has a dependency on the qmf library. The CLI tests were also ported to the faster library. CLI test time prior to this commit: 2 minutes 12 seconds CLI test time after this commit: 12.5 seconds Other items in qpid-config and qpid-stat: - The deprecated LVQ options (lqv, lqv-no-browse) were removed from qpid-config. - A new option, --lvq-key, was added to qpid-config to support the new LVQ configuration. The docs and tests were updated to match. - qpid-stat was updated so that 'qpid-stat -q ' prints full details from the specified queue. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1292388 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/qpid/testlib.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'qpid/python') diff --git a/qpid/python/qpid/testlib.py b/qpid/python/qpid/testlib.py index 1da53b3378..d9feb6b484 100644 --- a/qpid/python/qpid/testlib.py +++ b/qpid/python/qpid/testlib.py @@ -29,6 +29,9 @@ from qpid.message import Message from qpid.harness import Skipped from qpid.exceptions import VersionError +import qpid.messaging +import qpidtoollibs.broker + class TestBase(unittest.TestCase): """Base class for Qpid test cases. @@ -193,6 +196,15 @@ class TestBase010(unittest.TestCase): self.qmf = qmf.console.Session(handler) self.qmf_broker = self.qmf.addBroker(str(self.broker)) + def startBrokerAccess(self): + """ + New-style management access to the broker. Can be used in lieu of startQmf. + """ + if 'broker_conn' not in self.__dict__: + self.broker_conn = qpid.messaging.Connection(str(self.broker)) + self.broker_conn.open() + self.broker_access = qpidtoollibs.broker.BrokerAgent(self.broker_conn) + def connect(self, host=None, port=None): url = self.broker if url.scheme == URL.AMQPS: -- cgit v1.2.1