You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2019/07/17 19:05:16 UTC
[qpid-dispatch] branch master updated: DISPATCH-1374 - Made the -g
as the option that gets executed if qdstat is executed without any params
This is an automated email from the ASF dual-hosted git repository.
gmurthy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/master by this push:
new 17f0787 DISPATCH-1374 - Made the -g as the option that gets executed if qdstat is executed without any params
17f0787 is described below
commit 17f078790ba6909cec1827e1fd5bddc397e1d6bf
Author: Ganesh Murthy <gm...@apache.org>
AuthorDate: Wed Jul 17 15:04:50 2019 -0400
DISPATCH-1374 - Made the -g as the option that gets executed if qdstat is executed without any params
---
tests/system_tests_edge_router.py | 23 -----------------------
tests/system_tests_qdstat.py | 22 ++++++++++++++++++++--
tools/qdstat.in | 2 +-
3 files changed, 21 insertions(+), 26 deletions(-)
diff --git a/tests/system_tests_edge_router.py b/tests/system_tests_edge_router.py
index b642ec6..a33bdd0 100644
--- a/tests/system_tests_edge_router.py
+++ b/tests/system_tests_edge_router.py
@@ -1285,22 +1285,6 @@ class RouterTest(TestCase):
self.assertTrue("Types" in outs)
-
- # Run qdstat with no prarameters and make sure it executes qdstat --all-entities
- outs = self.run_qdstat(None,
- address=self.routers[2].addresses[0])
- # Check if each entity section is showing
- self.assertTrue("Router Links" in outs)
- self.assertTrue("Router Addresses" in outs)
- self.assertTrue("Connections" in outs)
- self.assertTrue("AutoLinks" in outs)
- self.assertTrue("Auto Links" in outs)
- self.assertEqual(outs.count("Link Routes"), 2)
- self.assertTrue("Router Statistics" in outs)
- self.assertTrue("Router Id EA1" in outs)
-
- self.assertTrue("Types" in outs)
-
def test_69_interior_qdstat_all_routers(self):
# Connects to an interior router and runs "qdstat --all-routers"
# "qdstat --all-routers" is same as "qdstat --all-routers --all-entities"
@@ -1382,13 +1366,6 @@ class RouterTest(TestCase):
self.assertEqual(outs.count("Router Statistics"), 1)
self.assertEqual(outs.count("Link Routes"), 2)
- #self.assertTrue("Router Addresses" in outs)
- #self.assertTrue("Connections" in outs)
- #self.assertTrue("AutoLinks" in outs)
- #self.assertTrue("Auto Links" in outs)
- #self.assertEqual(outs.count("Link Routes"), 2)
- #self.assertTrue("Router Statistics" in outs)
-
class LinkRouteProxyTest(TestCase):
"""
diff --git a/tests/system_tests_qdstat.py b/tests/system_tests_qdstat.py
index 48c9127..816747d 100644
--- a/tests/system_tests_qdstat.py
+++ b/tests/system_tests_qdstat.py
@@ -43,8 +43,14 @@ class QdstatTest(system_test.TestCase):
cls.router = cls.tester.qdrouterd('test-router', config)
def run_qdstat(self, args, regexp=None, address=None):
- p = self.popen(
- ['qdstat', '--bus', str(address or self.router.addresses[0]), '--timeout', str(system_test.TIMEOUT) ] + args,
+ if args:
+ popen_args = ['qdstat', '--bus', str(address or self.router.addresses[0]), '--timeout', str(system_test.TIMEOUT) ] + args
+ else:
+ popen_args = ['qdstat', '--bus',
+ str(address or self.router.addresses[0]),
+ '--timeout', str(system_test.TIMEOUT)]
+
+ p = self.popen(popen_args,
name='qdstat-'+self.id(), stdout=PIPE, expect=None,
universal_newlines=True)
@@ -88,6 +94,18 @@ class QdstatTest(system_test.TestCase):
parts = out.split("\n")
self.assertEqual(len(parts), 8)
+ def test_qdstat_no_args(self):
+ outs = self.run_qdstat(args=None)
+ self.assertTrue("Presettled Count" in outs)
+ self.assertTrue("Dropped Presettled Count" in outs)
+ self.assertTrue("Accepted Count" in outs)
+ self.assertTrue("Rejected Count" in outs)
+ self.assertTrue("Deliveries from Route Container" in outs)
+ self.assertTrue("Deliveries to Route Container" in outs)
+ self.assertTrue("Deliveries to Fallback" in outs)
+ self.assertTrue("Egress Count" in outs)
+ self.assertTrue("Ingress Count" in outs)
+
def test_address_priority(self):
out = self.run_qdstat(['--address'])
lines = out.split("\n")
diff --git a/tools/qdstat.in b/tools/qdstat.in
index 196243d..99d6052 100755
--- a/tools/qdstat.in
+++ b/tools/qdstat.in
@@ -79,7 +79,7 @@ def parse_args(argv):
parser.error("--all-entities cannot be combined with specific entity option -" + opts.show)
if not opts.all_routers and not opts.all_entities and not opts.show:
- opts.all_entities = u'all_entities'
+ opts.show = u'g'
return opts, args
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org