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 2017/05/01 15:17:44 UTC

qpid-dispatch git commit: DISPATCH-758 - Modified test_listen_error() in system_tests_one_router.py and system_tests_http.py to point to listeners that the router is already listening on

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master d9de2ba3f -> 7c795ac65


DISPATCH-758 - Modified test_listen_error() in system_tests_one_router.py and system_tests_http.py to point to listeners that the router is already listening on


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/7c795ac6
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/7c795ac6
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/7c795ac6

Branch: refs/heads/master
Commit: 7c795ac65eaddc39314a9318d86837cef33b21eb
Parents: d9de2ba
Author: Ganesh Murthy <gm...@redhat.com>
Authored: Mon May 1 11:17:25 2017 -0400
Committer: Ganesh Murthy <gm...@redhat.com>
Committed: Mon May 1 11:17:25 2017 -0400

----------------------------------------------------------------------
 tests/system_tests_http.py       | 4 +++-
 tests/system_tests_one_router.py | 7 ++++---
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/7c795ac6/tests/system_tests_http.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_http.py b/tests/system_tests_http.py
index 3d13c32..7244697 100644
--- a/tests/system_tests_http.py
+++ b/tests/system_tests_http.py
@@ -52,9 +52,11 @@ class RouterTestHttp(TestCase):
 
     def test_listen_error(self):
         """Make sure a router exits if an initial HTTP listener fails, doesn't hang"""
+        listen_port = self.get_port()
         config = Qdrouterd.Config([
             ('router', {'mode': 'standalone', 'id': 'bad'}),
-            ('listener', {'port': 80, 'http':True})])
+            ('listener', {'port': listen_port, 'maxFrameSize': '2048', 'stripAnnotations': 'no'}),
+            ('listener', {'port': listen_port, 'http':True})])
         r = Qdrouterd(name="expect_fail", config=config, wait=False);
         self.assertEqual(1, r.wait())
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/7c795ac6/tests/system_tests_one_router.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_one_router.py b/tests/system_tests_one_router.py
index 483d5e2..be7c731 100644
--- a/tests/system_tests_one_router.py
+++ b/tests/system_tests_one_router.py
@@ -34,13 +34,14 @@ class RouterTest(TestCase):
         """Start a router and a messenger"""
         super(RouterTest, cls).setUpClass()
         name = "test-router"
+        RouterTest.listen_port = cls.tester.get_port()
         config = Qdrouterd.Config([
             ('router', {'mode': 'standalone', 'id': 'QDR', 'allowUnsettledMulticast': 'yes'}),
 
             # Setting the stripAnnotations to 'no' so that the existing tests will work.
             # Setting stripAnnotations to no will not strip the annotations and any tests that were already in this file
             # that were expecting the annotations to not be stripped will continue working.
-            ('listener', {'port': cls.tester.get_port(), 'maxFrameSize': '2048', 'stripAnnotations': 'no'}),
+            ('listener', {'port': RouterTest.listen_port, 'maxFrameSize': '2048', 'stripAnnotations': 'no'}),
 
             # The following listeners were exclusively added to test the stripAnnotations attribute in qdrouterd.conf file
             # Different listeners will be used to test all allowed values of stripAnnotations ('no', 'both', 'out', 'in')
@@ -61,8 +62,8 @@ class RouterTest(TestCase):
         """Make sure a router exits if a initial listener fails, doesn't hang"""
         config = Qdrouterd.Config([
             ('router', {'mode': 'standalone', 'id': 'bad'}),
-            ('listener', {'port': 80})])
-        r = Qdrouterd(name="expect_fail", config=config, wait=False);
+            ('listener', {'port': RouterTest.listen_port})])
+        r = Qdrouterd(name="expect_fail", config=config, wait=False)
         self.assertEqual(1, r.wait())
 
     def test_01_pre_settled(self):


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org