diff options
| author | Ted Ross <tross@apache.org> | 2012-03-05 21:04:04 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2012-03-05 21:04:04 +0000 |
| commit | edbd969df9b013e534b496a10324b00e83d53f02 (patch) | |
| tree | 44c97bf8c56ce50f57d4d3dfa7cf057f3a8f76e3 /tests/src | |
| parent | 6455009d43ccf14db5e84bb3822fe77e9e1a5826 (diff) | |
| download | qpid-python-edbd969df9b013e534b496a10324b00e83d53f02.tar.gz | |
NO-JIRA - Cleaned up qpidtoollibs
1) Fixed the update() method to work on all object types
2) Shortened the path needed in import statements
3) Updated the connection-stats test to use qpidtoollibs
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1297230 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tests/src')
| -rw-r--r-- | tests/src/py/qpid_tests/broker_0_10/management.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/src/py/qpid_tests/broker_0_10/management.py b/tests/src/py/qpid_tests/broker_0_10/management.py index 867210b11d..a17a945e29 100644 --- a/tests/src/py/qpid_tests/broker_0_10/management.py +++ b/tests/src/py/qpid_tests/broker_0_10/management.py @@ -24,8 +24,17 @@ from threading import Condition from time import sleep import qmf.console import qpid.messaging +from qpidtoollibs import BrokerAgent class ManagementTest (TestBase010): + + def setup_access(self): + if 'broker_agent' not in self.__dict__: + self.conn2 = qpid.messaging.Connection(self.broker) + self.conn2.open() + self.broker_agent = BrokerAgent(self.conn2) + return self.broker_agent + """ Tests for the management hooks """ @@ -559,12 +568,18 @@ class ManagementTest (TestBase010): """ Test message in/out stats for connection """ - self.startQmf() + agent = self.setup_access() conn = self.connect() session = conn.session("stats-session") #using qmf find named session and the corresponding connection: - conn_qmf = self.qmf.getObjects(_class="session", name="stats-session")[0]._connectionRef_ + conn_qmf = None + sessions = agent.getAllSessions() + for s in sessions: + if s.name == "stats-session": + conn_qmf = agent.getConnection(s.connectionRef) + + assert(conn_qmf) #send a message to a queue session.queue_declare(queue="stats-q", exclusive=True, auto_delete=True) |
