ganeshmurthy commented on a change in pull request #782:
URL: https://github.com/apache/qpid-dispatch/pull/782#discussion_r459795884
##########
File path: tests/system_tests_qdstat.py
##########
@@ -66,24 +66,33 @@ def test_help(self):
def test_general(self):
out = self.run_qdstat(['--general'], r'(?s)Router
Statistics.*Mode\s*Standalone')
- self.assertTrue("Connections 1" in out)
- self.assertTrue("Nodes 0" in out)
- self.assertTrue("Auto Links 0" in out)
- self.assertTrue("Link Routes 0" in out)
- self.assertTrue("Worker Threads 1" in out)
- self.assertTrue("Router Id QDR.A" in out)
- self.assertTrue("Mode standalone" in out)
+
+ self.assertTrue(re.match(r"(.*)\bConnections\b[ \t]+\b1\b(.*)",
+ out, flags=re.DOTALL) is not None, out)
+ self.assertTrue(re.match(r"(.*)\bNodes\b[ \t]+\b0\b(.*)",
+ out, flags=re.DOTALL) is not None, out)
+ self.assertTrue(re.match(r"(.*)\bAuto Links\b[ \t]+\b0\b(.*)",
+ out, flags=re.DOTALL) is not None, out)
+ self.assertTrue(re.match(r"(.*)\bLink Routes\b[ \t]+\b0\b(.*)",
+ out, flags=re.DOTALL) is not None, out)
+ self.assertTrue(re.match(r"(.*)\bWorker Threads\b[ \t]+\b1\b(.*)",
+ out, flags=re.DOTALL) is not None, out)
+ self.assertTrue(re.match(r"(.*)\bRouter Id\b[ \t]+\bQDR.A\b(.*)",
+ out, flags=re.DOTALL) is not None, out)
+ self.assertTrue(re.match(r"(.*)\bMode\b[ \t]+\bstandalone\b(.*)",
+ out, flags=re.DOTALL) is not None, out)
+
self.assertEqual(out.count("QDR.A"), 2)
def test_general_csv(self):
out = self.run_qdstat(['--general', '--csv'], r'(?s)Router
Statistics.*Mode","Standalone')
- self.assertTrue("Connections","1" in out)
- self.assertTrue("Worker Threads", "1" in out)
- self.assertTrue("Nodes","0" in out)
- self.assertTrue("Auto Links","0" in out)
- self.assertTrue("Link Routes","0" in out)
- self.assertTrue("Router Id","QDR.A" in out)
- self.assertTrue("Mode","standalone" in out)
+ self.assertTrue('"Connections","1"' in out)
Review comment:
Thanks I used assertIn instead of assertTrue. I was not expecting it to
work on RHEL 6 but it did
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]