qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmur...@apache.org
Subject qpid-dispatch git commit: DISPATCH-508 - Removed deprecated entities and attributes from tests and moved it all to system_tests_deprecated
Date Wed, 21 Sep 2016 19:44:19 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master fe826e69e -> 118518516


DISPATCH-508 - Removed deprecated entities and attributes from tests and moved it all to system_tests_deprecated


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

Branch: refs/heads/master
Commit: 118518516e143815767183adbb8ef25755b2488b
Parents: fe826e6
Author: Ganesh Murthy <gmurthy@redhat.com>
Authored: Wed Sep 21 15:43:56 2016 -0400
Committer: Ganesh Murthy <gmurthy@redhat.com>
Committed: Wed Sep 21 15:43:56 2016 -0400

----------------------------------------------------------------------
 tests/system_tests_broker.py          |  6 ++----
 tests/system_tests_deprecated.py      |  8 ++++++++
 tests/system_tests_link_routes.py     | 32 +++++++++++++++---------------
 tests/system_tests_management.py      |  8 ++------
 tests/system_tests_protocol_family.py |  5 -----
 tests/system_tests_sasl_plain.py      | 10 +---------
 6 files changed, 29 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/11851851/tests/system_tests_broker.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_broker.py b/tests/system_tests_broker.py
index c42c465..98a164a 100644
--- a/tests/system_tests_broker.py
+++ b/tests/system_tests_broker.py
@@ -91,12 +91,10 @@ class DistributedQueueTest(system_test.TestCase): # pylint: disable=too-many-pub
                 rconf = self.common_router_conf(name, mode='interior')
                 rconf += [
                     ('listener', {'port':self.get_port(), 'role':'normal'}),
-                    ('fixedAddress', {'prefix':self.testq, 'phase':0, 'fanout':'single',
'bias':'spread'}),
-                    ('fixedAddress', {'prefix':self.testq, 'phase':1, 'fanout':'single',
'bias':'spread'})]
+                ]
                 for q in self.qpidds:
                     rconf += [
-                        ('connector', {'name':q.name, 'port':q.port}),
-                        ('waypoint', {'address':self.testq, 'outPhase':1, 'inPhase':0, 'connector':q.name})]
+                        ('connector', {'name':q.name, 'port':q.port})]
                 return self.qdrouterd(name, rconf, wait=False)
             routers = [router(i) for i in xrange(len(self.qpidds))]
             for r in routers: r.wait_ready()

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/11851851/tests/system_tests_deprecated.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_deprecated.py b/tests/system_tests_deprecated.py
index f10b1d5..f66e14a 100644
--- a/tests/system_tests_deprecated.py
+++ b/tests/system_tests_deprecated.py
@@ -52,6 +52,10 @@ class RouterTestDeprecated(RouterTestPlainSaslCommon):
                                     'saslConfigPath': os.getcwd()}),
                      ('linkRoutePattern', {'prefix': 'org.apache'}),
                      ('router', {'routerId': 'QDR.X', 'mode': 'interior'}),
+                     ('fixedAddress', {'prefix': '/closest/', 'fanout': 'single', 'bias':
'closest'}),
+                     ('fixedAddress', {'prefix': '/spread/', 'fanout': 'single', 'bias':
'spread'}),
+                     ('fixedAddress', {'prefix': '/multicast/', 'fanout': 'multiple'}),
+                     ('fixedAddress', {'prefix': '/', 'fanout': 'multiple'}),
         ])
 
         super(RouterTestDeprecated, cls).router('Y', [
@@ -70,6 +74,10 @@ class RouterTestDeprecated(RouterTestPlainSaslCommon):
                      ('listener', {'addr': '0.0.0.0',
                                    'role': 'normal',
                                    'port': y_listener_port}),
+                     ('fixedAddress', {'prefix': '/closest/', 'fanout': 'single', 'bias':
'closest'}),
+                     ('fixedAddress', {'prefix': '/spread/', 'fanout': 'single', 'bias':
'spread'}),
+                     ('fixedAddress', {'prefix': '/multicast/', 'fanout': 'multiple'}),
+                     ('fixedAddress', {'prefix': '/', 'fanout': 'multiple'}),
         ])
 
         cls.routers[1].wait_router_connected('QDR.X')

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/11851851/tests/system_tests_link_routes.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_link_routes.py b/tests/system_tests_link_routes.py
index 781eb93..a70f59c 100644
--- a/tests/system_tests_link_routes.py
+++ b/tests/system_tests_link_routes.py
@@ -32,11 +32,11 @@ from system_tests_drain_support import DrainMessagesHandler, DrainOneMessageHand
 
 from qpid_dispatch.management.client import Node
 
-class LinkRoutePatternTest(TestCase):
+class LinkRouteTest(TestCase):
     """
-    Tests the linkRoutePattern property of the dispatch router.
+    Tests the linkRoute property of the dispatch router.
 
-    Sets up 3 routers (one of which is acting as a broker(QDR.A)). 2 routers have linkRoutePattern
set to 'org.apache.'
+    Sets up 3 routers (one of which is acting as a broker(QDR.A)). 2 routers have linkRoute
set to 'org.apache.'
     (please see configs in the setUpClass method to get a sense of how the routers and their
connections are configured)
     The tests in this class send and receive messages across this network of routers to link
routable addresses.
     Uses the Python Blocking API to send/receive messages. The blocking api plays neatly
into the synchronous nature
@@ -57,17 +57,12 @@ class LinkRoutePatternTest(TestCase):
     @classmethod
     def setUpClass(cls):
         """Start three routers"""
-        super(LinkRoutePatternTest, cls).setUpClass()
+        super(LinkRouteTest, cls).setUpClass()
 
         def router(name, connection):
 
             config = [
                 ('router', {'mode': 'interior', 'id': 'QDR.%s'%name}),
-                ('fixedAddress', {'prefix': '/closest/', 'fanout': 'single', 'bias': 'closest'}),
-                ('fixedAddress', {'prefix': '/spread/', 'fanout': 'single', 'bias': 'spread'}),
-                ('fixedAddress', {'prefix': '/multicast/', 'fanout': 'multiple'}),
-                ('fixedAddress', {'prefix': '/', 'fanout': 'multiple'}),
-
             ] + connection
 
             config = Qdrouterd.Config(config)
@@ -93,7 +88,10 @@ class LinkRoutePatternTest(TestCase):
                    # Only inter router communication must happen on 'inter-router' connectors.
This connector makes
                    # a connection from the router B's ephemeral port to c_listener_port
                    ('connector', {'name': 'routerC', 'role': 'inter-router', 'host': '0.0.0.0',
'port': c_listener_port}),
-                   ('linkRoutePattern', {'prefix': 'org.apache', 'connector': 'broker'}),
+
+                   ('linkRoute', {'prefix': 'org.apache', 'connection': 'broker', 'dir':
'in'}),
+                   ('linkRoute', {'prefix': 'org.apache', 'connection': 'broker', 'dir':
'out'}),
+
                    ('linkRoute', {'prefix': 'pulp.task', 'connection': 'test-tag', 'dir':
'in'}),
                    ('linkRoute', {'prefix': 'pulp.task', 'connection': 'test-tag', 'dir':
'out'})
                 ]
@@ -103,9 +101,11 @@ class LinkRoutePatternTest(TestCase):
                    # The client will exclusively use the following listener to connect to
QDR.C
                    ('listener', {'host': '0.0.0.0', 'role': 'normal', 'port': cls.tester.get_port(),
'saslMechanisms': 'ANONYMOUS'}),
                    ('listener', {'host': '0.0.0.0', 'role': 'inter-router', 'port': c_listener_port,
'saslMechanisms': 'ANONYMOUS'}),
-                   # Note here that the linkRoutePattern is set to org.apache. which makes
it backward compatible.
                    # The dot(.) at the end is ignored by the address hashing scheme.
-                   ('linkRoutePattern', {'prefix': 'org.apache.'}),
+
+                   ('linkRoute', {'prefix': 'org.apache.', 'dir': 'in'}),
+                   ('linkRoute', {'prefix': 'org.apache.', 'dir': 'out'}),
+
                    ('linkRoute', {'prefix': 'pulp.task', 'dir': 'in'}),
                    ('linkRoute', {'prefix': 'pulp.task', 'dir': 'out'})
                 ]
@@ -222,11 +222,11 @@ class LinkRoutePatternTest(TestCase):
 
     def test_ddd_partial_link_route_match(self):
         """
-        The linkRoutePattern on Routers C and B is set to org.apache.
+        The linkRoute on Routers C and B is set to org.apache.
         Creates a receiver listening on the address 'org.apache.dev' and a sender that sends
to address 'org.apache.dev'.
         Sends a message to org.apache.dev via router QDR.C and makes sure that the message
was successfully
         routed (using partial address matching) and received using pre-created links that
were created as a
-        result of specifying addresses in the linkRoutePattern attribute('org.apache.').
+        result of specifying addresses in the linkRoute attribute('org.apache.').
         """
         hello_world_1 = "Hello World_1!"
 
@@ -309,11 +309,11 @@ class LinkRoutePatternTest(TestCase):
 
     def test_full_link_route_match(self):
         """
-        The linkRoutePattern on Routers C and B is set to org.apache.
+        The linkRoute on Routers C and B is set to org.apache.
         Creates a receiver listening on the address 'org.apache' and a sender that sends
to address 'org.apache'.
         Sends a message to org.apache via router QDR.C and makes sure that the message was
successfully
         routed (using full address matching) and received using pre-created links that were
created as a
-        result of specifying addresses in the linkRoutePattern attribute('org.apache.').
+        result of specifying addresses in the linkRoute attribute('org.apache.').
         """
         hello_world_3 = "Hello World_3!"
         # Connects to listener #2 on QDR.C

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/11851851/tests/system_tests_management.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_management.py b/tests/system_tests_management.py
index 662e11b..129e70f 100644
--- a/tests/system_tests_management.py
+++ b/tests/system_tests_management.py
@@ -35,7 +35,6 @@ OPERATIONAL = PREFIX + 'operationalEntity'
 LISTENER = PREFIX + 'listener'
 CONNECTOR = PREFIX + 'connector'
 FIXED_ADDRESS = PREFIX + 'fixedAddress'
-WAYPOINT = PREFIX + 'waypoint'
 DUMMY = PREFIX + 'dummy'
 ROUTER = PREFIX + 'router'
 LINK = ROUTER + '.link'
@@ -397,28 +396,25 @@ class ManagementTest(system_test.TestCase):
     def test_get_types(self):
         types = self.node.get_types()
         self.assertIn(CONFIGURATION, types[LISTENER])
-        self.assertIn(WAYPOINT, types)
         self.assertIn(OPERATIONAL, types[LINK])
 
     def test_get_attributes(self):
         types = self.node.get_attributes()
         self.assertIn(SSL_PROFILE, types[CONNECTOR])
-        self.assertEqual([], types[WAYPOINT])
 
     def test_get_operations(self):
         result = self.node.get_operations(type=DUMMY)
         self.assertEqual({DUMMY: ["CREATE", "READ", "UPDATE", "DELETE", "CALLME"]}, result)
         result = self.node.get_operations()
-        for type in LISTENER, WAYPOINT, LINK: self.assertIn(type, result)
+        for type in LISTENER, LINK: self.assertIn(type, result)
         self.assertEqual(["UPDATE", "READ"], result[LINK])
-        self.assertEqual(["CREATE", "DELETE", "READ"], result[WAYPOINT])
 
     def test_get_attributes(self):
         result = self.node.get_attributes(type=DUMMY)
         self.assertEqual(set([u'arg1', u'arg2', u'num1', u'num2', u'name', u'identity', u'type']),
                          set(result[DUMMY]))
         result = self.node.get_attributes()
-        for type in LISTENER, WAYPOINT, LINK: self.assertIn(type, result)
+        for type in LISTENER, LINK: self.assertIn(type, result)
         for a in ['linkType', 'linkDir', 'owningAddr']: self.assertIn(a, result[LINK])
 
     def test_standalone_no_inter_router(self):

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/11851851/tests/system_tests_protocol_family.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_protocol_family.py b/tests/system_tests_protocol_family.py
index 4b46eed..20822c1 100644
--- a/tests/system_tests_protocol_family.py
+++ b/tests/system_tests_protocol_family.py
@@ -63,11 +63,6 @@ class ProtocolFamilyTest(TestCase):
                 # Specify host as ::1 and protocol family as IPv6
                 ('listener', {'host': '::1', 'protocolFamily': 'IPv6', 'port': cls.tester.get_port(protocol_family='IPv6')}),
 
-                ('fixedAddress', {'prefix': '/closest/', 'fanout': 'single', 'bias': 'closest'}),
-                ('fixedAddress', {'prefix': '/spread/', 'fanout': 'single', 'bias': 'spread'}),
-                ('fixedAddress', {'prefix': '/multicast/', 'fanout': 'multiple'}),
-                ('fixedAddress', {'prefix': '/', 'fanout': 'multiple'}),
-
             ] + connection
 
             config = Qdrouterd.Config(config)

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/11851851/tests/system_tests_sasl_plain.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_sasl_plain.py b/tests/system_tests_sasl_plain.py
index d009235..1894f51 100644
--- a/tests/system_tests_sasl_plain.py
+++ b/tests/system_tests_sasl_plain.py
@@ -29,15 +29,7 @@ class RouterTestPlainSaslCommon(TestCase):
     @classmethod
     def router(cls, name, connection):
 
-        config = [
-            ('fixedAddress', {'prefix': '/closest/', 'fanout': 'single', 'bias': 'closest'}),
-            ('fixedAddress', {'prefix': '/spread/', 'fanout': 'single', 'bias': 'spread'}),
-            ('fixedAddress', {'prefix': '/multicast/', 'fanout': 'multiple'}),
-            ('fixedAddress', {'prefix': '/', 'fanout': 'multiple'}),
-
-        ] + connection
-
-        config = Qdrouterd.Config(config)
+        config = Qdrouterd.Config(connection)
 
         cls.routers.append(cls.tester.qdrouterd(name, config, wait=False))
 


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


Mime
View raw message