diff options
| author | Kenneth Anthony Giusti <kgiusti@apache.org> | 2013-07-26 17:13:19 +0000 |
|---|---|---|
| committer | Kenneth Anthony Giusti <kgiusti@apache.org> | 2013-07-26 17:13:19 +0000 |
| commit | 4082dc0a9503d786797757c2e733ad781eb51661 (patch) | |
| tree | 45a1d41ddd357e3dcc82e4d45ceb89a5a5aeb48b /qpid/cpp/src/tests | |
| parent | 5f5638e3c997f5e24136b5001c640756507b80ee (diff) | |
| download | qpid-python-4082dc0a9503d786797757c2e733ad781eb51661.tar.gz | |
QPID-5019: add flag to distinguish QMFv2 events
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1507370 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
| -rwxr-xr-x | qpid/cpp/src/tests/qpidd_qmfv2_tests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/qpidd_qmfv2_tests.py b/qpid/cpp/src/tests/qpidd_qmfv2_tests.py index bd64928dae..55497ccc03 100755 --- a/qpid/cpp/src/tests/qpidd_qmfv2_tests.py +++ b/qpid/cpp/src/tests/qpidd_qmfv2_tests.py @@ -88,7 +88,9 @@ class ConsoleTest(BrokerTest): class Handler(qmf.console.Console): def __init__(self): self.v1_oids = 0 + self.v1_events = 0 self.v2_oids = 0 + self.v2_events = 0 self.broker_info = [] self.broker_conn = [] self.newpackage = [] @@ -116,6 +118,11 @@ class ConsoleTest(BrokerTest): def event(self, broker, event): #print "EVENT %s" % event self.events.append(event) + if event.isV2: + self.v2_events += 1 + else: + self.v1_events += 1 + def heartbeat(self, agent, timestamp): #print "Heartbeat %s" % agent self.heartbeats.append( (agent, timestamp) ) @@ -178,8 +185,10 @@ class ConsoleTest(BrokerTest): # verify that the published objects were of the correct QMF version if self._broker_is_v1: assert handler.v1_oids and handler.v2_oids == 0, "QMFv2 updates received while in V1-only mode!" + assert handler.v1_events and handler.v2_events == 0, "QMFv2 events received while in V1-only mode!" else: assert handler.v2_oids and handler.v1_oids == 0, "QMFv1 updates received while in V2-only mode!" + assert handler.v2_events and handler.v1_events == 0, "QMFv1 events received while in V2-only mode!" def _test_async_method(self): class Handler (qmf.console.Console): |
