Author: kgiusti Date: Tue Apr 7 19:35:02 2015 New Revision: 1671930 URL: http://svn.apache.org/r1671930 Log: NO-JIRA: fix unit test failure when memory pools are disabled Modified: qpid/dispatch/trunk/tests/system_tests_qdstat.py qpid/dispatch/trunk/tools/qdstat Modified: qpid/dispatch/trunk/tests/system_tests_qdstat.py URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tests/system_tests_qdstat.py?rev=1671930&r1=1671929&r2=1671930&view=diff ============================================================================== --- qpid/dispatch/trunk/tests/system_tests_qdstat.py (original) +++ qpid/dispatch/trunk/tests/system_tests_qdstat.py Tue Apr 7 19:35:02 2015 @@ -63,7 +63,12 @@ class QdstatTest(system_test.TestCase): self.run_qdstat(['--address'], r'\$management') def test_memory(self): - self.run_qdstat(['--memory'], r'qd_address_t\s+[0-9]+') + out = self.run_qdstat(['--memory']) + if out.strip() == "No memory statistics available": + # router built w/o memory pools enabled] + self.skipTest("Router's memory pools disabled") + regexp = r'qd_address_t\s+[0-9]+' + assert re.search(regexp, out, re.I), "Can't find '%s' in '%s'" % (regexp, out) def test_log(self): self.run_qdstat(['--log', '--limit=5'], r'AGENT \(trace\).*GET-LOG') Modified: qpid/dispatch/trunk/tools/qdstat URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/tools/qdstat?rev=1671930&r1=1671929&r2=1671930&view=diff ============================================================================== --- qpid/dispatch/trunk/tools/qdstat (original) +++ qpid/dispatch/trunk/tools/qdstat Tue Apr 7 19:35:02 2015 @@ -282,6 +282,10 @@ class BusManager(Node): row.append(t.batchesRebalancedToThreads) row.append(t.batchesRebalancedToGlobal) rows.append(row) + if not rows: + # router built w/o memory pools: + print "No memory statistics available" + return title = "Types" sorter = Sorter(heads, rows, 'type', 0, True) dispRows = sorter.getSorted() --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org