Github user ted-ross commented on a diff in the pull request:

    https://github.com/apache/qpid-dispatch/pull/14#discussion_r41393944
  
    --- Diff: tests/system_tests_link_routes.py ---
    @@ -0,0 +1,282 @@
    +#
    +# Licensed to the Apache Software Foundation (ASF) under one
    +# or more contributor license agreements.  See the NOTICE file
    +# distributed with this work for additional information
    +# regarding copyright ownership.  The ASF licenses this file
    +# to you under the Apache License, Version 2.0 (the
    +# "License"); you may not use this file except in compliance
    +# with the License.  You may obtain a copy of the License at
    +#
    +#   http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing,
    +# software distributed under the License is distributed on an
    +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +# KIND, either express or implied.  See the License for the
    +# specific language governing permissions and limitations
    +# under the License.
    +#
    +
    +import unittest
    +from time import sleep
    +from system_test import TestCase, Qdrouterd, main_module
    +
    +from proton import Message
    +from proton.reactor import AtMostOnce
    +from proton.utils import BlockingConnection, LinkDetached
    +
    +from qpid_dispatch.management.client import Node
    +from system_test import TIMEOUT
    +
    +class LinkRoutePatternTest(TestCase):
    +    """
    +    Tests the linkRoutePattern 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.'
    +    (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
    +    of system tests.
    +
    +        QDR.A acting broker
    +             +---------+         +---------+         +---------+     
+-----------------+
    +             |         | <------ |         | <-----  |         |<----| 
blocking_sender |
    +             |  QDR.A  |         |  QDR.B  |         |  QDR.C  |     
+-----------------+
    +             |         | ------> |         | ------> |         |     
+-------------------+
    +             +---------+         +---------+         +---------+---->| 
blocking_receiver |
    +                                                                     
+-------------------+
    +    """
    +    @classmethod
    +    def get_router(cls, index):
    +        return cls.routers[index]
    +
    +    @classmethod
    +    def setUpClass(cls):
    +        """Start three routers"""
    +        super(LinkRoutePatternTest, cls).setUpClass()
    +
    +        def router(name, connection):
    +
    +            config = [
    +                ('container', {'workerThreads': 4, 'containerName': 
'Qpid.Dispatch.Router.%s'%name}),
    +                ('router', {'mode': 'interior', 'routerId': 
'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)
    +            cls.routers.append(cls.tester.qdrouterd(name, config, 
wait=False))
    +
    +        cls.routers = []
    +        a_listener_port = cls.tester.get_port()
    +        b_listener_port = cls.tester.get_port()
    +        c_listener_port = cls.tester.get_port()
    +
    +        router('A',
    +               [
    +                   ('listener', {'role': 'normal', 'addr': '0.0.0.0', 
'port': a_listener_port, 'saslMechanisms': 'ANONYMOUS'}),
    +               ])
    +        router('B',
    +               [
    +                   ('listener', {'role': 'inter-router', 'addr': 
'0.0.0.0', 'port': b_listener_port, 'saslMechanisms': 'ANONYMOUS'}),
    --- End diff --
    
    Router B shouldn't need two inter-router connections.  One will do.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to