You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/04/25 22:12:50 UTC

[1/5] qpid-dispatch git commit: DISPATCH-739: Use default system_test.TIMEOUT for all tests

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 8f92b2029 -> 5e61dd9a9


DISPATCH-739: Use default system_test.TIMEOUT for all tests

valgrind requires longer timeouts, you can set a shorter one
for non-valgrind tests with env. var. QPID_SYSTEM_TEST_TIMEOUT.


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

Branch: refs/heads/master
Commit: 92020aa78417e4f478dad4079e27e2a9be62233f
Parents: 8f92b20
Author: Alan Conway <ac...@redhat.com>
Authored: Tue Apr 25 17:34:12 2017 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Apr 25 17:42:25 2017 -0400

----------------------------------------------------------------------
 tests/system_tests_autolinks.py                 | 14 +++----
 .../system_tests_denied_unsettled_multicast.py  | 12 +++---
 tests/system_tests_drain_support.py             |  7 ++--
 tests/system_tests_dynamic_terminus.py          |  4 +-
 tests/system_tests_failover_list.py             | 12 +++---
 tests/system_tests_link_routes.py               | 17 ++++----
 tests/system_tests_multi_tenancy.py             | 20 +++++-----
 tests/system_tests_one_router.py                | 14 +++----
 tests/system_tests_three_routers.py             | 42 ++++++++++----------
 tests/system_tests_two_routers.py               |  4 +-
 10 files changed, 73 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/92020aa7/tests/system_tests_autolinks.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_autolinks.py b/tests/system_tests_autolinks.py
index 928cf5c..1776e93 100644
--- a/tests/system_tests_autolinks.py
+++ b/tests/system_tests_autolinks.py
@@ -19,7 +19,7 @@
 
 import unittest
 from proton import Message, Delivery, PENDING, ACCEPTED, REJECTED
-from system_test import TestCase, Qdrouterd, main_module
+from system_test import TestCase, Qdrouterd, main_module, TIMEOUT
 from proton.handlers import MessagingHandler
 from proton.reactor import Container, AtMostOnce, AtLeastOnce
 
@@ -192,7 +192,7 @@ class AutolinkAttachTest(MessagingHandler):
         self.conn.close()
 
     def on_start(self, event):
-        self.timer = event.reactor.schedule(5, Timeout(self))
+        self.timer = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn  = event.container.connect(self.address)
 
     def on_connection_closed(self, event):
@@ -243,7 +243,7 @@ class AutolinkCreditTest(MessagingHandler):
             self.route_conn.close()
 
     def on_start(self, event):
-        self.timer       = event.reactor.schedule(5, Timeout(self))
+        self.timer       = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.normal_conn = event.container.connect(self.normal_address)
         self.sender      = event.container.create_sender(self.normal_conn, self.dest)
         self.last_action = "Attached normal sender"
@@ -299,7 +299,7 @@ class AutolinkSenderTest(MessagingHandler):
             self.route_conn.close()
 
     def on_start(self, event):
-        self.timer       = event.reactor.schedule(5, Timeout(self))
+        self.timer       = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.route_conn  = event.container.connect(self.route_address)
         self.last_action = "Connected route container"
 
@@ -365,7 +365,7 @@ class AutolinkReceiverTest(MessagingHandler):
             self.route_conn.close()
 
     def on_start(self, event):
-        self.timer       = event.reactor.schedule(5, Timeout(self))
+        self.timer       = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.route_conn  = event.container.connect(self.route_address)
         self.last_action = "Connected route container"
 
@@ -426,7 +426,7 @@ class InterContainerTransferTest(MessagingHandler):
         self.conn_2.close()
 
     def on_start(self, event):
-        self.timer  = event.reactor.schedule(5, Timeout(self))
+        self.timer  = event.reactor.schedule(TIMEOUT, Timeout(self))
         event.container.container_id = 'container.2'
         self.conn_1 = event.container.connect(self.route_address)
         event.container.container_id = 'container.3'
@@ -483,7 +483,7 @@ class ManageAutolinksTest(MessagingHandler):
         self.route_conn.close()
 
     def on_start(self, event):
-        self.timer  = event.reactor.schedule(5, Timeout(self))
+        self.timer  = event.reactor.schedule(TIMEOUT, Timeout(self))
         event.container.container_id = 'container.new'
         self.route_conn  = event.container.connect(self.route_address)
         self.normal_conn = event.container.connect(self.normal_address)

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/92020aa7/tests/system_tests_denied_unsettled_multicast.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_denied_unsettled_multicast.py b/tests/system_tests_denied_unsettled_multicast.py
index 3008fcc..b139733 100644
--- a/tests/system_tests_denied_unsettled_multicast.py
+++ b/tests/system_tests_denied_unsettled_multicast.py
@@ -30,7 +30,7 @@ try:
 except ImportError:
     from proton import PN_STATUS_MODIFIED as MODIFIED
 
-    
+
 class RouterTest(TestCase):
 
     inter_router_port = None
@@ -41,21 +41,21 @@ class RouterTest(TestCase):
         super(RouterTest, cls).setUpClass()
 
         def router(name):
-            
+
             config = [
                 ('router', {'mode': 'standalone', 'id': name}),
                 ('listener', {'port': cls.tester.get_port()}),
                 ('address', {'prefix': 'multicast', 'distribution' : 'multicast'}),
             ]
-            
+
             config = Qdrouterd.Config(config)
 
             cls.routers.append(cls.tester.qdrouterd(name, config, wait=True))
 
         cls.routers = []
-        
+
         inter_router_port = cls.tester.get_port()
-        
+
         router('A')
         cls.routers[0].wait_ready()
 
@@ -107,7 +107,7 @@ class DeniedUnsettledMulticastTest(MessagingHandler):
             self.sent_pres += 1
 
     def on_start(self, event):
-        self.timer    = event.reactor.schedule(5, Timeout(self))
+        self.timer    = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn     = event.container.connect(self.host)
         self.receiver = event.container.create_receiver(self.conn, self.addr)
         self.sender   = event.container.create_sender(self.conn, self.addr)

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/92020aa7/tests/system_tests_drain_support.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_drain_support.py b/tests/system_tests_drain_support.py
index e59f870..661cf20 100644
--- a/tests/system_tests_drain_support.py
+++ b/tests/system_tests_drain_support.py
@@ -20,6 +20,7 @@
 from proton.handlers import MessagingHandler
 from proton.reactor import Container
 from proton import Message, Endpoint
+from system_test import TIMEOUT
 
 class Timeout(object):
     def __init__(self, parent):
@@ -46,7 +47,7 @@ class DrainMessagesHandler(MessagingHandler):
         self.conn.close()
 
     def on_start(self, event):
-        self.timer = event.reactor.schedule(5, Timeout(self))
+        self.timer = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn = event.container.connect(self.address)
 
         # Create a sender and a receiver. They are both listening on the same address
@@ -137,7 +138,7 @@ class DrainNoMessagesHandler(MessagingHandler):
         self.conn.close()
 
     def on_start(self, event):
-        self.timer = event.reactor.schedule(5, Timeout(self))
+        self.timer = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn = event.container.connect(self.address)
 
         # Create a sender and a receiver. They are both listening on the same address
@@ -175,7 +176,7 @@ class DrainNoMoreMessagesHandler(MessagingHandler):
         self.conn.close()
 
     def on_start(self, event):
-        self.timer = event.reactor.schedule(5, Timeout(self))
+        self.timer = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn = event.container.connect(self.address)
 
         # Create a sender and a receiver. They are both listening on the same address

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/92020aa7/tests/system_tests_dynamic_terminus.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_dynamic_terminus.py b/tests/system_tests_dynamic_terminus.py
index 39606d3..bd43cf3 100644
--- a/tests/system_tests_dynamic_terminus.py
+++ b/tests/system_tests_dynamic_terminus.py
@@ -123,7 +123,7 @@ class DynamicSourceTest(MessagingHandler):
         self.receiver_conn.close()
 
     def on_start(self, event):
-        self.timer = event.reactor.schedule(5, Timeout(self))
+        self.timer = event.reactor.schedule(TIMEOUT, Timeout(self))
 
         self.sender_1_conn = event.container.connect(self.router_1_host)
         self.sender_2_conn = event.container.connect(self.router_2_host)
@@ -203,7 +203,7 @@ class DynamicTargetTest(MessagingHandler):
         self.receiver_conn.close()
 
     def on_start(self, event):
-        self.timer = event.reactor.schedule(5, Timeout(self))
+        self.timer = event.reactor.schedule(TIMEOUT, Timeout(self))
 
         self.sender_conn   = event.container.connect(self.sender_host)
         self.receiver_conn = event.container.connect(self.receiver_host)

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/92020aa7/tests/system_tests_failover_list.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_failover_list.py b/tests/system_tests_failover_list.py
index b7cc30b..af76835 100644
--- a/tests/system_tests_failover_list.py
+++ b/tests/system_tests_failover_list.py
@@ -30,7 +30,7 @@ try:
 except ImportError:
     from proton import PN_STATUS_MODIFIED as MODIFIED
 
-    
+
 class RouterTest(TestCase):
 
     inter_router_port = None
@@ -41,22 +41,22 @@ class RouterTest(TestCase):
         super(RouterTest, cls).setUpClass()
 
         def router(name):
-            
+
             config = [
                 ('router', {'mode': 'standalone', 'id': name}),
                 ('listener', {'port': cls.tester.get_port()}),
                 ('listener', {'port': cls.tester.get_port(), 'failoverList': 'other-host:25000'}),
                 ('listener', {'port': cls.tester.get_port(), 'failoverList': 'second-host:25000, amqps://third-host:5671'})
             ]
-            
+
             config = Qdrouterd.Config(config)
 
             cls.routers.append(cls.tester.qdrouterd(name, config, wait=True))
 
         cls.routers = []
-        
+
         inter_router_port = cls.tester.get_port()
-        
+
         router('A')
         cls.routers[0].wait_ready()
 
@@ -100,7 +100,7 @@ class FailoverTest(MessagingHandler):
         self.conn.close()
 
     def on_start(self, event):
-        self.timer = event.reactor.schedule(5, Timeout(self))
+        self.timer = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn  = event.container.connect(self.host)
 
     def on_connection_opened(self, event):

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/92020aa7/tests/system_tests_link_routes.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_link_routes.py b/tests/system_tests_link_routes.py
index 7aed283..6dfb387 100644
--- a/tests/system_tests_link_routes.py
+++ b/tests/system_tests_link_routes.py
@@ -620,7 +620,7 @@ class DeliveryTagsTest(MessagingHandler):
             self.sender_connection.close()
 
     def on_start(self, event):
-        self.timer               = event.reactor.schedule(5, Timeout(self))
+        self.timer               = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.receiver_connection = event.container.connect(self.listening_address)
 
     def on_connection_remote_open(self, event):
@@ -692,7 +692,7 @@ class CloseWithUnsettledTest(MessagingHandler):
         self.conn_route.close()
 
     def on_start(self, event):
-        self.timer      = event.reactor.schedule(5, Timeout(self))
+        self.timer      = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn_route = event.container.connect(self.route_addr)
 
     def on_connection_opened(self, event):
@@ -740,7 +740,7 @@ class DynamicSourceTest(MessagingHandler):
         self.conn_route.close()
 
     def on_start(self, event):
-        self.timer      = event.reactor.schedule(5, Timeout(self))
+        self.timer      = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn_route = event.container.connect(self.route_addr)
 
     def on_connection_opened(self, event):
@@ -797,7 +797,7 @@ class DynamicTargetTest(MessagingHandler):
         self.conn_route.close()
 
     def on_start(self, event):
-        self.timer      = event.reactor.schedule(5, Timeout(self))
+        self.timer      = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn_route = event.container.connect(self.route_addr)
 
     def on_connection_opened(self, event):
@@ -850,9 +850,9 @@ class DetachNoCloseTest(MessagingHandler):
         self.conn_normal.close()
         self.conn_route.close()
         self.timer.cancel()
-        
+
     def on_start(self, event):
-        self.timer      = event.reactor.schedule(5, Timeout(self))
+        self.timer      = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn_route = event.container.connect(self.route_addr)
 
     def on_connection_opened(self, event):
@@ -913,9 +913,9 @@ class DetachMixedCloseTest(MessagingHandler):
         self.conn_normal.close()
         self.conn_route.close()
         self.timer.cancel()
-        
+
     def on_start(self, event):
-        self.timer      = event.reactor.schedule(5, Timeout(self))
+        self.timer      = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn_route = event.container.connect(self.route_addr)
 
     def on_connection_opened(self, event):
@@ -1069,4 +1069,3 @@ class TerminusAddrTest(MessagingHandler):
 
 if __name__ == '__main__':
     unittest.main(main_module())
-

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/92020aa7/tests/system_tests_multi_tenancy.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_multi_tenancy.py b/tests/system_tests_multi_tenancy.py
index 0430d98..3e4a16d 100644
--- a/tests/system_tests_multi_tenancy.py
+++ b/tests/system_tests_multi_tenancy.py
@@ -30,7 +30,7 @@ try:
 except ImportError:
     from proton import PN_STATUS_MODIFIED as MODIFIED
 
-    
+
 class RouterTest(TestCase):
 
     inter_router_port = None
@@ -41,7 +41,7 @@ class RouterTest(TestCase):
         super(RouterTest, cls).setUpClass()
 
         def router(name, connection):
-            
+
             config = [
                 ('router', {'mode': 'interior', 'id': name}),
                 ('listener', {'port': cls.tester.get_port(), 'stripAnnotations': 'no'}),
@@ -57,15 +57,15 @@ class RouterTest(TestCase):
                 ('address', {'prefix': '0.0.0.0/queue', 'waypoint': 'yes'}),
                 connection
             ]
-            
+
             config = Qdrouterd.Config(config)
 
             cls.routers.append(cls.tester.qdrouterd(name, config, wait=True))
 
         cls.routers = []
-        
+
         inter_router_port = cls.tester.get_port()
-        
+
         router('A', ('listener', {'role': 'inter-router', 'port': inter_router_port}))
         router('B', ('connector', {'name': 'connectorToA', 'role': 'inter-router', 'port': inter_router_port, 'verifyHostName': 'no'}))
 
@@ -494,7 +494,7 @@ class MessageTransferTest(MessagingHandler):
         self.lookup_conn.close()
 
     def on_start(self, event):
-        self.timer          = event.reactor.schedule(10, Timeout(self))
+        self.timer          = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.sender_conn    = event.container.connect(self.sender_host)
         self.receiver_conn  = event.container.connect(self.receiver_host)
         self.lookup_conn    = event.container.connect(self.lookup_host)
@@ -535,7 +535,7 @@ class MessageTransferTest(MessagingHandler):
             self.receiver_conn.close()
             self.lookup_conn.close()
             self.timer.cancel()
-            
+
     def on_accepted(self, event):
         if event.sender == self.sender:
             self.n_accepted += 1
@@ -587,7 +587,7 @@ class MessageTransferAnonTest(MessagingHandler):
         self.poll()
 
     def on_start(self, event):
-        self.timer          = event.reactor.schedule(10, Timeout(self))
+        self.timer          = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.poll_timer     = None
         self.sender_conn    = event.container.connect(self.sender_host)
         self.receiver_conn  = event.container.connect(self.receiver_host)
@@ -714,7 +714,7 @@ class LinkRouteTest(MessagingHandler):
 
 
     def on_start(self, event):
-        self.timer          = event.reactor.schedule(10, Timeout(self))
+        self.timer          = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.first_conn     = event.container.connect(self.first_host)
         self.second_conn    = event.container.connect(self.second_host)
         self.lookup_conn    = event.container.connect(self.lookup_host)
@@ -833,7 +833,7 @@ class WaypointTest(MessagingHandler):
             self.waypoint_sender.send(m)
 
     def on_start(self, event):
-        self.timer       = event.reactor.schedule(10, Timeout(self))
+        self.timer       = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.first_conn  = event.container.connect(self.first_host)
         self.second_conn = event.container.connect(self.second_host)
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/92020aa7/tests/system_tests_one_router.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_one_router.py b/tests/system_tests_one_router.py
index 0f0cc81..0a982c7 100644
--- a/tests/system_tests_one_router.py
+++ b/tests/system_tests_one_router.py
@@ -19,7 +19,7 @@
 
 import unittest
 from proton import Condition, Message, Delivery, PENDING, ACCEPTED, REJECTED
-from system_test import TestCase, Qdrouterd, main_module
+from system_test import TestCase, Qdrouterd, main_module, TIMEOUT
 from proton.handlers import MessagingHandler
 from proton.reactor import Container, AtMostOnce, AtLeastOnce
 from proton.utils import BlockingConnection, SyncRequestResponse
@@ -1247,7 +1247,7 @@ class MulticastUnsettledTest(MessagingHandler):
         self.conn.close()
 
     def on_start(self, event):
-        self.timer     = event.reactor.schedule(5, Timeout(self))
+        self.timer     = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn      = event.container.connect(self.address)
         self.sender    = event.container.create_sender(self.conn, self.dest)
         self.receiver1 = event.container.create_receiver(self.conn, self.dest, name="A")
@@ -1299,7 +1299,7 @@ class MultiframePresettledTest(MessagingHandler):
         self.conn.close()
 
     def on_start(self, event):
-        self.timer     = event.reactor.schedule(5, Timeout(self))
+        self.timer     = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn      = event.container.connect(self.address)
         self.sender    = event.container.create_sender(self.conn, self.dest)
         self.receiver  = event.container.create_receiver(self.conn, self.dest, name="A")
@@ -1346,7 +1346,7 @@ class ReleasedVsModifiedTest(MessagingHandler):
         self.conn.close()
 
     def on_start(self, event):
-        self.timer     = event.reactor.schedule(5, Timeout(self))
+        self.timer     = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn      = event.container.connect(self.address)
         self.sender    = event.container.create_sender(self.conn, self.dest)
         self.receiver  = event.container.create_receiver(self.conn, self.dest, name="A")
@@ -1399,7 +1399,7 @@ class AppearanceOfBalanceTest(MessagingHandler):
         self.conn.close()
 
     def on_start(self, event):
-        self.timer      = event.reactor.schedule(5, Timeout(self))
+        self.timer      = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn       = event.container.connect(self.address)
         self.sender     = event.container.create_sender(self.conn, self.dest)
         self.receiver_a = event.container.create_receiver(self.conn, self.dest, name="A")
@@ -1456,7 +1456,7 @@ class BatchedSettlementTest(MessagingHandler):
         self.conn.close()
 
     def on_start(self, event):
-        self.timer    = event.reactor.schedule(10, Timeout(self))
+        self.timer    = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn     = event.container.connect(self.address)
         self.sender   = event.container.create_sender(self.conn, self.dest)
         self.receiver = event.container.create_receiver(self.conn, self.dest)
@@ -1501,7 +1501,7 @@ class PresettledOverflowTest(MessagingHandler):
         self.conn.close()
 
     def on_start(self, event):
-        self.timer    = event.reactor.schedule(5, Timeout(self))
+        self.timer    = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn     = event.container.connect(self.address)
         self.sender   = event.container.create_sender(self.conn, self.dest)
         self.receiver = event.container.create_receiver(self.conn, self.dest)

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/92020aa7/tests/system_tests_three_routers.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_three_routers.py b/tests/system_tests_three_routers.py
index 19bed4d..83719e5 100644
--- a/tests/system_tests_three_routers.py
+++ b/tests/system_tests_three_routers.py
@@ -43,12 +43,12 @@ class RouterTest(TestCase):
         super(RouterTest, cls).setUpClass()
 
         def router(name, connection_1, connection_2=None):
-            
+
             config = [
                 ('router', {'mode': 'interior', 'id': 'QDR.%s'%name}),
-                
+
                 ('listener', {'port': cls.tester.get_port(), 'stripAnnotations': 'no'}),
-                
+
                 ('address', {'prefix': 'closest',   'distribution': 'closest'}),
                 ('address', {'prefix': 'spread',    'distribution': 'balanced'}),
                 ('address', {'prefix': 'multicast', 'distribution': 'multicast'})
@@ -56,17 +56,17 @@ class RouterTest(TestCase):
             config.append(connection_1)
             if None != connection_2:
                 config.append(connection_2)
-            
+
             config = Qdrouterd.Config(config)
 
             cls.routers.append(cls.tester.qdrouterd(name, config, wait=True))
 
         cls.routers = []
-        
+
         inter_router_port_1 = cls.tester.get_port()
         inter_router_port_2 = cls.tester.get_port()
 
-        #   A <--- B <--- C 
+        #   A <--- B <--- C
         router('A', ('listener', {'role': 'inter-router', 'port': inter_router_port_1}) )
 
         router('B', ('listener', {'role': 'inter-router', 'port': inter_router_port_2}),
@@ -120,7 +120,7 @@ class TargetedSenderTest(MessagingHandler):
 
     def on_start(self, event):
         # receiver <--- A <--- B <---- C <--- sender
-        self.timer = event.reactor.schedule(5, Timeout(self))
+        self.timer = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn1 = event.container.connect(self.address1)
         self.conn2 = event.container.connect(self.address2)
         self.sender   = event.container.create_sender(self.conn1, self.dest)
@@ -146,8 +146,8 @@ class TargetedSenderTest(MessagingHandler):
 
     def run(self):
         Container(self).run()
- 
- 
+
+
 
 class AnonymousSenderTest(MessagingHandler):
     def __init__(self, address1, address2):
@@ -162,13 +162,13 @@ class AnonymousSenderTest(MessagingHandler):
         self.n_sent     = 0
         self.n_received = 0
         self.n_accepted = 0
- 
+
     def timeout(self):
         self.error = "Timeout Expired %d messages received." % self.n_received
         self.conn1.close()
         self.conn2.close()
- 
-    # The problem with using an anonymous sender in a router 
+
+    # The problem with using an anonymous sender in a router
     # network is that it takes finite time for endpoint information
     # to propagate around the network.  It is possible for me to
     # start sending before my router knows how to route my messages,
@@ -176,7 +176,7 @@ class AnonymousSenderTest(MessagingHandler):
     # doomed to wait eternally for the tenth message to be received.
     # To fix this, we will detect released messages here, and decrement
     # the sent message counter, forcing a resend for each drop.
-    # And also pause for a moment, since we know that the network is 
+    # And also pause for a moment, since we know that the network is
     # not yet ready.
     def on_released(self, event):
         self.n_sent -= 1
@@ -187,27 +187,27 @@ class AnonymousSenderTest(MessagingHandler):
             # This sender has no destination addr, so we will have to
             # address each message individually.
             # Also -- Create the sender here, when we know that the
-            # receiver link has opened, because then we are at least 
+            # receiver link has opened, because then we are at least
             # close to being able to send.  (See comment above.)
             self.sender = event.container.create_sender(self.conn1, None)
 
     def on_start(self, event):
-        self.timer = event.reactor.schedule(5, Timeout(self))
+        self.timer = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn1 = event.container.connect(self.address1)
         self.conn2 = event.container.connect(self.address2)
         self.receiver = event.container.create_receiver(self.conn2, self.dest)
         self.receiver.flow(self.n_expected)
- 
+
     def on_sendable(self, event):
         if self.n_sent < self.n_expected:
             # Add the destination addr to each message.
             msg = Message(body=self.n_sent, address=self.dest)
             event.sender.send(msg)
             self.n_sent += 1
- 
+
     def on_accepted(self, event):
         self.n_accepted += 1
- 
+
     def on_message(self, event):
         self.n_received += 1
         if self.n_received == self.n_expected:
@@ -218,8 +218,8 @@ class AnonymousSenderTest(MessagingHandler):
 
     def run(self):
         Container(self).run()
- 
- 
- 
+
+
+
 if __name__ == '__main__':
     unittest.main(main_module())

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/92020aa7/tests/system_tests_two_routers.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_two_routers.py b/tests/system_tests_two_routers.py
index 7eec4b5..5e55b47 100644
--- a/tests/system_tests_two_routers.py
+++ b/tests/system_tests_two_routers.py
@@ -1082,7 +1082,7 @@ class ExcessDeliveriesReleasedTest(MessagingHandler):
         self.conn2.close()
 
     def on_start(self, event):
-        self.timer = event.reactor.schedule(5, Timeout(self))
+        self.timer = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn1 = event.container.connect(self.address1)
         self.conn2 = event.container.connect(self.address2)
         self.sender   = event.container.create_sender(self.conn1, self.dest)
@@ -1132,7 +1132,7 @@ class AttachOnInterRouterTest(MessagingHandler):
         self.conn.close()
 
     def on_start(self, event):
-        self.timer  = event.reactor.schedule(5, Timeout(self))
+        self.timer  = event.reactor.schedule(TIMEOUT, Timeout(self))
         self.conn   = event.container.connect(self.address)
         self.sender = event.container.create_sender(self.conn, self.dest)
 


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


[4/5] qpid-dispatch git commit: DISPATCH-205: Schema.validate() called many times

Posted by ac...@apache.org.
DISPATCH-205: Schema.validate() called many times

Replace wildly inefficient validation scheme with one that checks each new
entity exactly once for unique attribute and singleton clashes.

Better error message for forbidden python imports


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

Branch: refs/heads/master
Commit: 3b1fe11453b2ac7a776a56c94f135cedafd9bd0b
Parents: af6c53e
Author: Alan Conway <ac...@redhat.com>
Authored: Tue Mar 28 13:33:50 2017 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Apr 25 18:08:53 2017 -0400

----------------------------------------------------------------------
 python/qpid_dispatch/management/entity.py       |   3 +
 python/qpid_dispatch_internal/dispatch.py       |  10 +-
 .../qpid_dispatch_internal/management/agent.py  |   8 +-
 .../management/qdrouter.py                      |  24 ++--
 .../qpid_dispatch_internal/management/schema.py | 142 +++++++------------
 .../management/schema_doc.py                    |   4 +-
 tests/management/schema.py                      |   2 +-
 7 files changed, 77 insertions(+), 116 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3b1fe114/python/qpid_dispatch/management/entity.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch/management/entity.py b/python/qpid_dispatch/management/entity.py
index 17ff00a..4e5466a 100644
--- a/python/qpid_dispatch/management/entity.py
+++ b/python/qpid_dispatch/management/entity.py
@@ -62,6 +62,9 @@ class EntityBase(object):
     def __getattr__(self, name):
         return self.attributes[name]
 
+    def __contains__(self, name):
+        return name in self.attributes
+
     @staticmethod
     def _pyname(name): return name.replace('-', '_')
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3b1fe114/python/qpid_dispatch_internal/dispatch.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/dispatch.py b/python/qpid_dispatch_internal/dispatch.py
index e397f86..c35fb5d 100644
--- a/python/qpid_dispatch_internal/dispatch.py
+++ b/python/qpid_dispatch_internal/dispatch.py
@@ -111,8 +111,12 @@ class QdDll(ctypes.PyDLL):
         return self._prototype(getattr(self, fname), restype, argtypes, check)
 
 
-# Prevent accidental loading of the proton module.
-
+# Prevent accidental loading of the proton python module inside dispatch.
+# The proton-C library is linked with the dispatch C library, loading the proton
+# python module loads a second copy of the library and mayhem ensues.
+#
+# Note the FORBIDDEN list is over-written to disable this tests in mock python
+# testing code.
 FORBIDDEN = ["proton"]
 
 def check_forbidden():
@@ -122,7 +126,7 @@ def check_forbidden():
 
 def import_check(name, *args, **kw):
     if name in FORBIDDEN:
-        raise ImportError("Attempted to load forbidden module '%s'." % name)
+        raise ImportError("Python code running inside a dispatch router cannot import '%s', use the 'dispatch' module for internal messaging" % name)
     return builtin_import(name, *args, **kw)
 
 check_forbidden()

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3b1fe114/python/qpid_dispatch_internal/management/agent.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/management/agent.py b/python/qpid_dispatch_internal/management/agent.py
index 7f50cb8..45b7d6f 100644
--- a/python/qpid_dispatch_internal/management/agent.py
+++ b/python/qpid_dispatch_internal/management/agent.py
@@ -52,7 +52,6 @@ getting current information from the implementation object.
 
 ## Threading:
 
-
 The agent is locked to be thread safe, called in the following threads:
 - Reading configuration file in initialization thread (no contention).
 - Management requests arriving in multiple, concurrent connection threads.
@@ -61,9 +60,6 @@ The agent is locked to be thread safe, called in the following threads:
 When refreshing attributes, the agent must also read C implementation object
 data that may be updated in other threads.
 
-# FIXME aconway 2015-02-09:
-Temporary solution is to lock the entire dispatch router lock during full refresh.
-Better solution coming soon...
 """
 
 import traceback, json, pstats
@@ -208,7 +204,7 @@ class EntityAdapter(SchemaEntity):
         """Handle update request with new attributes from management client"""
         self.entity_type.update_check(request.body, self.attributes)
         newattrs = dict(self.attributes, **request.body)
-        self.entity_type.validate(newattrs, update=True)
+        self.entity_type.validate(newattrs)
         self.attributes = newattrs
         self._update()
         return (OK, self.attributes)
@@ -561,7 +557,7 @@ class EntityCache(object):
         self.log(LOG_DEBUG, "Add entity: %s" % entity)
         entity.validate()       # Fill in defaults etc.
         # Validate in the context of the existing entities for uniqueness
-        self.schema.validate_full(chain(iter([entity]), iter(self.entities)))
+        self.schema.validate_add(entity, self.entities)
         self.entities.append(entity)
 
     def _add_implementation(self, implementation, adapter=None):

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3b1fe114/python/qpid_dispatch_internal/management/qdrouter.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/management/qdrouter.py b/python/qpid_dispatch_internal/management/qdrouter.py
index 5f21913..2590b64 100644
--- a/python/qpid_dispatch_internal/management/qdrouter.py
+++ b/python/qpid_dispatch_internal/management/qdrouter.py
@@ -44,24 +44,20 @@ class QdSchema(schema.Schema):
         self.configuration_entity = self.entity_type(self.CONFIGURATION_ENTITY)
         self.operational_entity = self.entity_type(self.OPERATIONAL_ENTITY)
 
-    def validate_full(self, entities, **kwargs):
+    def validate_add(self, attributes, entities):
         """
-        In addition to L{schema.Schema.validate}, check the following:
-
-        listeners and connectors can only have role=inter-router if the
-        router has mode=interior.
-
-
-        @param entities: List of attribute name:value maps.
-        @param kwargs: See L{schema.Schema.validate}
+        Check that listeners and connectors can only have role=inter-router if the router has
+        mode=interior.
         """
-        entities = list(entities) # Need to traverse twice
-        super(QdSchema, self).validate_all(entities, **kwargs)
+        entities = list(entities) # Iterate twice
+        super(QdSchema, self).validate_add(attributes, entities)
+        entities.append(attributes)
         inter_router = not_interior = None
         for e in entities:
-            if self.short_name(e.type) == "router" and e.mode != "interior":
-                not_interior = e.mode
-            if self.short_name(e.type) in ["listener", "connector"] and e.role == "inter-router":
+            short_type = self.short_name(e['type'])
+            if short_type == "router" and e['mode'] != "interior":
+                not_interior = e['mode']
+            if short_type in ["listener", "connector"] and e['role'] == "inter-router":
                 inter_router = e
             if not_interior and inter_router:
                 raise schema.ValidationError(

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3b1fe114/python/qpid_dispatch_internal/management/schema.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/management/schema.py b/python/qpid_dispatch_internal/management/schema.py
index 7559c73..590b33e 100644
--- a/python/qpid_dispatch_internal/management/schema.py
+++ b/python/qpid_dispatch_internal/management/schema.py
@@ -35,12 +35,6 @@ class ValidationError(Exception):
     """Error raised if schema validation fails"""
     pass
 
-def quotestr(value, quote="'"):
-    """Quote value if it is a string type, str() it if not """
-    if isinstance(value, basestring): return "'%s'" % value
-    else: return str(value)
-
-
 class Type(object):
     """Base class for schema types.
 
@@ -54,11 +48,9 @@ class Type(object):
         """
         self.name, self.pytype = name, pytype
 
-    def validate(self, value, **kwargs): # pylint: disable=unused-argument
+    def validate(self, value):
         """
         Convert value to the correct python type.
-
-        @param kwargs: See L{Schema.validate_all}
         """
         return self.pytype(value)
 
@@ -82,11 +74,10 @@ class BooleanType(Type):
 
     VALUES = {"yes":1, "true":1, "on":1, "no":0, "false":0, "off":0}
 
-    def validate(self, value, **kwargs):
+    def validate(self, value):
         """
         @param value: A string such as "yes", "false" etc. is converted appropriately.
             Any other type is converted using python's bool()
-        @param kwargs: See L{Schema.validate_all}
         @return A python bool.
         """
         try:
@@ -122,11 +113,10 @@ class EnumType(Type):
         super(EnumType, self).__init__("enum%s"%([str(t) for t in tags]), int)
         self.tags = tags
 
-    def validate(self, value, **kwargs):
+    def validate(self, value):
         """
         @param value: May be a string from the set of enum tag strings or anything
             that can convert to an int - in which case it must be in the enum range.
-        @param kwargs: See L{Schema.validate_all}
         @return: An EnumValue.
         """
         if value in self.tags:
@@ -147,7 +137,7 @@ class EnumType(Type):
 
     def __str__(self):
         """String description of enum type."""
-        return "One of [%s]" % ', '.join([quotestr(tag) for tag in self.tags])
+        return "One of [%s]" % ', '.join([("'%s'" %tag) for tag in self.tags])
 
 BUILTIN_TYPES = OrderedDict(
     (t.name, t) for t in [Type("string", str),
@@ -177,18 +167,6 @@ def _dump_dict(items):
     """
     return OrderedDict((k, v) for k, v in items if v)
 
-def _is_unique(found, item):
-    """
-    Return true if found is None or item is not in found (adds item to found.)
-    Return false if item is in found.
-    """
-    if found is None or found is False:
-        return True
-    if item not in found:
-        found.add(item)
-        return True
-    return False
-
 class AttributeType(object):
     """
     Definition of an attribute.
@@ -234,38 +212,28 @@ class AttributeType(object):
             ex, msg, trace = sys.exc_info()
             raise ValidationError, "Attribute '%s': %s" % (name, msg), trace
 
-    def missing_value(self, check_required=True, add_default=True, **kwargs):
+    def missing_value(self):
         """
         Fill in missing default and fixed values.
-        @keyword check_required: Raise an exception if required attributes are misssing.
-        @keyword add_default:  Add a default value for missing attributes.
-        @param kwargs: See L{Schema.validate_all}
         """
         if self.value is not None: # Fixed value attribute
             return self.value
-        if add_default and self.default is not None:
+        if self.default is not None:
             return self.default
-        if check_required and self.required:
+        if self.required:
             raise ValidationError("Missing required attribute '%s'" % (self.name))
 
-    def validate(self, value, check_unique=None, **kwargs):
+    def validate(self, value):
         """
         Validate value for this attribute definition.
         @param value: The value to validate.
-        @keyword check_unique: set of (name, value) to check for attribute uniqueness.
-            None means don't check for uniqueness.
-        @param create: if true, check that the attribute allows create
-        @param update: if true, check that the attribute allows update
-        @param kwargs: See L{Schema.validate_all}
         @return: value converted to the correct python type. Rais exception if any check fails.
         """
-        if self.unique and not _is_unique(check_unique, (self.name, value)):
-            raise ValidationError("Duplicate value '%s' for unique attribute '%s'"%(value, self.name))
         if self.value and value != self.value:
             raise ValidationError("Attribute '%s' has fixed value '%s' but given '%s'"%(
                 self.name, self.value, value))
         try:
-            return self.atype.validate(value, **kwargs)
+            return self.atype.validate(value)
         except (TypeError, ValueError), e:
             raise ValidationError, str(e), sys.exc_info()[2]
 
@@ -320,8 +288,9 @@ class EntityType(object):
     @ivar singleton: If true only one entity of this type is allowed.
     @ivar referential: True if an entity can be referred to by name from another entity.
     """
-    def __init__(self, name, schema, attributes=None, operations=None, operationDefs=None, description="",
-                 fullName=True, singleton=False, deprecated=False, extends=None, referential=False, **kwargs):
+    def __init__(self, name, schema, attributes=None, operations=None, operationDefs=None,
+                 description="", fullName=True, singleton=False, deprecated=False,
+                 extends=None, referential=False):
         """
         @param name: name of the entity type.
         @param schema: schema for this type.
@@ -400,25 +369,19 @@ class EntityType(object):
         """Return only attribute types defined in this entity type"""
         return [a for a in self.attributes.itervalues() if a.defined_in == self]
 
-    def validate(self, attributes, check_singleton=None, **kwargs):
+    def validate(self, attributes):
         """
         Validate attributes for entity type.
         @param attributes: Map attributes name:value or Entity with attributes property.
             Modifies attributes: adds defaults, converts values.
-        @param check_singleton: set of entity-type name to enable singleton checking.
-            None to disable.
-        @param kwargs: See L{Schema.validate_all}
         """
-
         if isinstance(attributes, SchemaEntity): attributes = attributes.attributes
 
-        if self.singleton and not _is_unique(check_singleton, self.name):
-            raise ValidationError("Multiple instances of singleton '%s'"%self.name)
         try:
             # Add missing values
             for attr in self.attributes.itervalues():
                 if attributes.get(attr.name) is None:
-                    value = attr.missing_value(**kwargs)
+                    value = attr.missing_value()
                     if value is not None: attributes[attr.name] = value
                     if value is None and attr.name in attributes:
                         del attributes[attr.name]
@@ -427,7 +390,7 @@ class EntityType(object):
             for name, value in attributes.iteritems():
                 if name == 'type':
                     value = self.schema.long_name(value)
-                attributes[name] = self.attribute(name).validate(value, **kwargs)
+                attributes[name] = self.attribute(name).validate(value)
         except ValidationError, e:
             raise  ValidationError, "%s: %s"%(self, e), sys.exc_info()[2]
 
@@ -540,48 +503,49 @@ class Schema(object):
     def entity_type(self, name, error=True):
         return self._lookup(self.entity_types, name, "No such entity type '%s'", error)
 
-    def validate_entity(self, attributes, check_required=True, add_default=True,
-                        check_unique=None, check_singleton=None):
+    def validate_entity(self, attributes):
         """
         Validate a single entity.
 
         @param attributes: Map of attribute name: value
-        @keyword check_required: Raise exception if required attributes are missing.
-        @keyword add_default: Add defaults for missing attributes.
-        @keyword check_unique: Used by L{validate_all}
-        @keyword check_singleton: Used by L{validate_all}
         """
         attributes['type'] = self.long_name(attributes['type'])
         entity_type = self.entity_type(attributes['type'])
-        entity_type.validate(
-            attributes,
-            check_required=check_required,
-            add_default=add_default,
-            check_unique=check_unique,
-            check_singleton=check_singleton)
-
-    def validate_all(self, attribute_maps, check_required=True, add_default=True,
-                     check_unique=True, check_singleton=True):
-        """
-        Validate a list of attribute maps representing entity attributes.
-        Verify singleton entities and unique attributes are unique.
-        Modifies attribute_maps, adds default values, converts values.
-
-        @param attribute_maps: List of attribute name:value maps.
-        @keyword check_required: Raise exception if required attributes are missing.
-        @keyword add_default: Add defaults for missing attributes.
-        @keyword check_unique: Raise exception if unique attributes are duplicated.
-        @keyword check_singleton: Raise exception if singleton entities are duplicated
-        """
-        if check_singleton: check_singleton = set()
-        if check_unique: check_unique = set()
-
-        for e in attribute_maps:
-            self.validate_entity(e,
-                                 check_required=check_required,
-                                 add_default=add_default,
-                                 check_unique=check_unique,
-                                 check_singleton=check_singleton)
+        entity_type.validate(attributes)
+
+    def validate_all(self, attribute_maps):
+        """
+        Validate all the entities from entity_iter, return a list of valid entities.
+        """
+        entities = []
+        for a in attribute_maps:
+            self.validate_add(a, entities)
+            entities.append(a);
+
+    def validate_add(self, attributes, entities):
+        """
+        Validate that attributes would be valid when added to entities.
+        Assumes entities are already valid
+        @raise ValidationError if adding e violates a global constraint like uniqueness.
+        """
+        self.validate_entity(attributes)
+        entity_type = self.entity_type(attributes['type'])
+        # Find all the unique attribute types present in attributes
+        unique = [a for a in entity_type.attributes.values() if a.unique and a.name in attributes]
+        if not unique and not entity_type.singleton:
+            return              # Nothing to do
+        for e in entities:
+            if entity_type.singleton and attributes['type'] == e['type']:
+                raise ValidationError("Adding %s singleton %s when %s already exists" %
+                                      (attributes['type'], attributes, e))
+            for a in unique:
+                try:
+                    if entity_type.attributes[a.name] == a and attributes[a.name] == e[a.name]:
+                        raise ValidationError(
+                            "adding %s duplicates unique attribute '%s' from existing %s"%
+                            (attributes, a.name, e))
+                except KeyError:
+                    continue    # Missing attribute or definition means no clash
 
     def entity(self, attributes):
         """Convert an attribute map into an L{SchemaEntity}"""
@@ -617,5 +581,5 @@ class SchemaEntity(EntityBase):
         super(SchemaEntity, self)._set(name, value)
         self.validate()
 
-    def validate(self, **kwargs):
-        self.entity_type.validate(self.attributes, **kwargs)
+    def validate(self):
+        self.entity_type.validate(self.attributes)

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3b1fe114/python/qpid_dispatch_internal/management/schema_doc.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/management/schema_doc.py b/python/qpid_dispatch_internal/management/schema_doc.py
index ecf2825..a9a0881 100644
--- a/python/qpid_dispatch_internal/management/schema_doc.py
+++ b/python/qpid_dispatch_internal/management/schema_doc.py
@@ -21,8 +21,6 @@
 
 from collections import namedtuple
 import sys
-from .schema import quotestr
-
 
 class SchemaWriter(object):
     """Write the schema as an asciidoc document"""
@@ -57,7 +55,7 @@ class SchemaWriter(object):
             default = None  # Don't show defaults that are references, confusing.
         return ' (%s)' % (', '.join(
             filter(None, [str(attr.atype),
-                          default and "default=%s" % quotestr(default),
+                          default and "default='%s'" % default,
                           attr.required and "required",
                           attr.unique and "unique",
                           show_create and attr.create and "`CREATE`",

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3b1fe114/tests/management/schema.py
----------------------------------------------------------------------
diff --git a/tests/management/schema.py b/tests/management/schema.py
index 9ab3fcf..dd22276 100644
--- a/tests/management/schema.py
+++ b/tests/management/schema.py
@@ -165,7 +165,7 @@ class SchemaTest(unittest.TestCase):
 
         # This will make sure that deprecated flag defaults to false for entities
         self.assertFalse(s.entity_types['org.example.connector'].deprecated)
-        
+
         # This will make sure that deprecated flag defaults to false for attributes of entities
         self.assertFalse(s.entity_types['org.example.listener'].attributes['host'].deprecated)
 


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


[2/5] qpid-dispatch git commit: DISPATCH-739: Define test runner with `cmake -DTEST_RUNNER`

Posted by ac...@apache.org.
DISPATCH-739: Define test runner with `cmake -DTEST_RUNNER`

Allow test runners other than valgrind (e.g. the amazing "rr" recording debugger)
Also makes it easier to edit valgrind options in CMakeCache.txt


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

Branch: refs/heads/master
Commit: 9c7b5e936c6b302ba5a1c8f97d2500ea6f57e6ea
Parents: 92020aa
Author: Alan Conway <ac...@redhat.com>
Authored: Mon Apr 24 16:01:32 2017 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Apr 25 17:52:31 2017 -0400

----------------------------------------------------------------------
 CMakeLists.txt             |  6 +++
 README                     | 23 ++++-------
 run.py.in                  | 57 ++++++---------------------
 tests/CMakeLists.txt       | 18 ++++-----
 tests/system_test.py       | 86 +++++++++++++++++------------------------
 tests/system_tests_http.py |  2 -
 6 files changed, 68 insertions(+), 124 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/9c7b5e93/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18b3be2..46f651e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -114,6 +114,12 @@ mark_as_advanced(VALGRIND_EXECUTABLE)
 find_package_handle_standard_args(VALGRIND DEFAULT_MSG VALGRIND_EXECUTABLE)
 option(USE_VALGRIND "Use valgrind when running tests" OFF)
 
+if (USE_VALGRIND)
+  set(VG_RUNNER "${VALGRIND_EXECUTABLE} --leak-check=full --show-leak-kinds=definite --errors-for-leak-kinds=definite --error-exitcode=42 --suppressions=${CMAKE_SOURCE_DIR}/tests/valgrind.supp --quiet")
+endif()
+
+set(TEST_RUNNER "${VG_RUNNER}" CACHE STRING "Program to run test executables")
+
 ##
 ## Include directories used by all sub-directories.
 ##

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/9c7b5e93/README
----------------------------------------------------------------------
diff --git a/README b/README
index 409fc4f..641ee64 100644
--- a/README
+++ b/README
@@ -65,19 +65,10 @@ This does the following:
 - Run system tests on the installation in 'install'.
 
 
-Valgrind support
-================
-
-If valgrind is installed it will be used by default when running the tests.
-Set the cmake option 'USE_VALGRIND' to 'ON' or 'OFF' to enable/disable valgrind.
-You can also set the environment variable 'USE_VALGRIND' to 'ON or 'OFF'.
-If set the environment variable takes precendence over the cmake option.
-
-By default valgrind uses the memcheck tool to find memory-related
-issues.  The tool can be overrided using the 'VALGRIND_TOOL'
-environment variable.  The location of the valgrind suppression file
-can be overrided by setting the 'VALGRIND_SUPPRESSIONS' environment
-variable to an alternate suppression file.  Additional valgrind
-options can be passed by setting the 'VALGRIND_OPTS' to a space
-separated string containing the additional options.
-E.g. VALGRIND_OPTS="--xml=yes --max-stackframe=10000000"
+Using Valgrind
+==============
+
+If valgrind is installed and cmake option 'USE_VALGRIND' is 'ON' the tests will
+be run with valgrind's memcheck debugger. You can set other types of test runner
+or modify the valgrind flags by setting the TEST_RUNNER cmake variable.
+

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/9c7b5e93/run.py.in
----------------------------------------------------------------------
diff --git a/run.py.in b/run.py.in
index cfafde8..292e57c 100755
--- a/run.py.in
+++ b/run.py.in
@@ -31,16 +31,8 @@ Usage:
 run.py <program> [<arg>....]               # Run a program, can be an interactive shell. Use PATH.
 run.py -m <python-module>  [<arg>....]     # Run a python module. Use PYTHONPATH.
 run.py -s <python-script>.py  [<arg>....]  # Run a python script.
-run.py --vg <program> [<arg>....]          # Run a program with valgrind if enabled. Use PATH.
+run.py -x <program> [<arg>....]            # Run an executable with the test runner
 run.py --sh                                # Print a shell script to set the run.py environment.
-
-Valgrind can be enabled or disabled by the cmake 'USE_VALGRIND' option and the
-environment variable 'USE_VALGRIND' (set to 'ON' or 'OFF'). The environment
-variable takes precendence if set.  By default valgrind runs the 'memcheck'
-tool. The valgrind tool and supression file can be overridden by setting the
-'VALGRIND_TOOL' and 'VALGRIND_SUPPRESSIONS' environment variables,
-respectively. Additional options can be provided via the 'VALGRIND_OPTS'
-environment variable.
 """
 
 import os, sys, runpy
@@ -63,6 +55,9 @@ def getpath(env):
         return path.split(os.pathsep)
     return []
 
+# Test runner program and args (e.g. valgrind)
+test_runner = "${TEST_RUNNER}"
+
 env_vars = {
     'PYTHONPATH': os.pathsep.join(sys.path),
     'PATH': os.pathsep.join(dedup(["${CMAKE_BINARY_DIR}",
@@ -77,21 +72,11 @@ env_vars = {
     'SOURCE_DIR': "${CMAKE_SOURCE_DIR}",
     'BUILD_DIR': "${CMAKE_BINARY_DIR}",
     'QPID_DISPATCH_HOME': "${CMAKE_SOURCE_DIR}",
-    'QPID_DISPATCH_LIB': "${CMAKE_BINARY_DIR}/src/${QPID_DISPATCH_LIB}"
+    'QPID_DISPATCH_LIB': "${CMAKE_BINARY_DIR}/src/${QPID_DISPATCH_LIB}",
+    'QPID_DISPATCH_TEST_RUNNER': test_runner
 }
 os.environ.update(env_vars)
 
-# Valgrind setup
-valgrind_exe = "${VALGRIND_EXECUTABLE}"
-
-def use_valgrind():
-    """True if we should use valgrind"""
-    if not os.path.exists(valgrind_exe): return False
-    def on(str):
-        return str.lower() in ['on', 'yes', '1']
-    env = os.environ.get('USE_VALGRIND')
-    if env: return on(env)
-    return on("${USE_VALGRIND}")
 
 def find_exe(program):
     """Find an executable in the system PATH"""
@@ -112,26 +97,6 @@ def is_binary_exe(program):
     p = Popen(['file', '-bi', program], stdout=PIPE, stderr=PIPE)
     return p.communicate()[0].startswith('application/x-executable')
 
-VALGRIND_ERROR = 42   # magic number indicating valgrind found errors
-def with_valgrind(args, outfile=None):
-    if use_valgrind() and is_binary_exe(find_exe(args[0])):
-        opts = ['--leak-check=full',
-                # Python generates a ton of "possibly lost" and "still in use"
-                # false alarms, restrict to "definite" leaks.
-                # Ideally we should have more specific python exclusions.
-                '--show-leak-kinds=definite',
-                '--errors-for-leak-kinds=definite',
-                '--error-exitcode=%d' % VALGRIND_ERROR,
-                '--quiet']
-        opts.append('--tool=%s' % os.environ.get('VALGRIND_TOOL', 'memcheck'))
-        supp = os.environ.get('VALGRIND_SUPPRESSIONS',
-                              '${CMAKE_SOURCE_DIR}/tests/valgrind.supp')
-        opts.append('--suppressions=%s' % supp)
-        if outfile: opts.append('--log-file=%s' % outfile)
-        opts.extend(os.environ.get('VALGRIND_OPTS', "").split())
-        return ([valgrind_exe]+opts+args, VALGRIND_ERROR)
-    return (args, 0)
-
 def run_path(file_path, run_name=None):
     """Wrapper for run path that falls back to exec python for python < 2.7"""
     if hasattr(runpy, 'run_path'):
@@ -153,17 +118,17 @@ if __name__ == "__main__":
             error_prefix = "Run python script '%s':"%(sys.argv[0])
             run_path(sys.argv[0], run_name="__main__")
         elif sys.argv[1] == '--sh':
-            for name, value in env_vars.iteritems(): print "%s=%s"%(name, value)
+            for name, value in env_vars.iteritems(): print '%s="%s"'%(name, value)
             print "export %s"%' '.join(env_vars.keys())
-        elif sys.argv[1] == '--vg':
-            args, ignore = with_valgrind(sys.argv[2:])
-            error_prefix = "Run executable '%s' with valgrind: "%(args[0])
+        elif sys.argv[1] == '-x':
+            args = test_runner.split() + sys.argv[2:]
+            error_prefix = "Running '%s': "%(args)
             os.execvp(args[0], args)
         elif sys.argv[1].startswith('-'):
             print usage
         else:
             args = sys.argv[1:]
-            error_prefix = "Run executable '%s': "%(args[0])
+            error_prefix = "Running '%s': "%(args)
             os.execvp(args[0], args)
     except Exception, e:
         print "%s%s: %s"%(error_prefix, type(e).__name__, e)

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/9c7b5e93/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index d961e3a..314ad50 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -53,15 +53,15 @@ target_link_libraries(unit_tests_size qpid-dispatch)
 
 set(TEST_WRAP ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/run.py)
 
-add_test(unit_tests_size_10000 ${TEST_WRAP} --vg unit_tests_size 10000)
-add_test(unit_tests_size_512   ${TEST_WRAP} --vg unit_tests_size 512)
-add_test(unit_tests_size_10    ${TEST_WRAP} --vg unit_tests_size 10)
-add_test(unit_tests_size_7     ${TEST_WRAP} --vg unit_tests_size 7)
-add_test(unit_tests_size_5     ${TEST_WRAP} --vg unit_tests_size 5)
-add_test(unit_tests_size_3     ${TEST_WRAP} --vg unit_tests_size 3)
-add_test(unit_tests_size_2     ${TEST_WRAP} --vg unit_tests_size 2)
-add_test(unit_tests_size_1     ${TEST_WRAP} --vg unit_tests_size 1)
-add_test(unit_tests            ${TEST_WRAP} --vg unit_tests ${CMAKE_CURRENT_SOURCE_DIR}/threads4.conf)
+add_test(unit_tests_size_10000 ${TEST_WRAP} -x unit_tests_size 10000)
+add_test(unit_tests_size_512   ${TEST_WRAP} -x unit_tests_size 512)
+add_test(unit_tests_size_10    ${TEST_WRAP} -x unit_tests_size 10)
+add_test(unit_tests_size_7     ${TEST_WRAP} -x unit_tests_size 7)
+add_test(unit_tests_size_5     ${TEST_WRAP} -x unit_tests_size 5)
+add_test(unit_tests_size_3     ${TEST_WRAP} -x unit_tests_size 3)
+add_test(unit_tests_size_2     ${TEST_WRAP} -x unit_tests_size 2)
+add_test(unit_tests_size_1     ${TEST_WRAP} -x unit_tests_size 1)
+add_test(unit_tests            ${TEST_WRAP} -x unit_tests ${CMAKE_CURRENT_SOURCE_DIR}/threads4.conf)
 
 # Unit test python modules
 add_test(router_engine_test    ${TEST_WRAP} -m unittest -v router_engine_test)

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/9c7b5e93/tests/system_test.py
----------------------------------------------------------------------
diff --git a/tests/system_test.py b/tests/system_test.py
index ad55812..3257432 100755
--- a/tests/system_test.py
+++ b/tests/system_test.py
@@ -34,13 +34,6 @@ import proton
 from proton import Message
 from qpid_dispatch.management.client import Node
 
-try:
-    # NOTE: the tests can be run outside a build to test an installed dispatch.
-    # In this case we won't have access to the run.py module so no valgrind.
-    from run import with_valgrind
-except ImportError:
-    def with_valgrind(args, outfile): return (args, 0)
-
 # Optional modules
 MISSING_MODULES = []
 
@@ -189,13 +182,13 @@ def message(**properties):
 class Process(subprocess.Popen):
     """
     Popen that can be torn down at the end of a TestCase and stores its output.
-    Uses valgrind if enabled.
+    Use $TEST_RUNNER as a prefix to the executable if it is defined in the environment.
     """
 
     # Expected states of a Process at teardown
-    RUNNING = 1                   # Still running
-    EXIT_OK = 2                   # Exit status 0
-    EXIT_FAIL = 3                 # Exit status not 0
+    RUNNING = -1                # Still running
+    EXIT_OK = 0                 # Exit status 0
+    EXIT_FAIL = 1               # Exit status 1
 
     unique_id = 0
     @classmethod
@@ -209,7 +202,8 @@ class Process(subprocess.Popen):
         @param expect: Raise error if process staus not as expected at end of test:
             L{RUNNING} - expect still running.
             L{EXIT_OK} - expect proces to have terminated with 0 exit status.
-            L{EXIT_ERROR} - expect proces to have terminated with non-0 exit status.
+            L{EXIT_FAIL} - expect proces to have terminated with exit status 1.
+            integer    - expected return code
         @keyword stdout: Defaults to the file name+".out"
         @keyword stderr: Defaults to be the same as stdout
         """
@@ -217,56 +211,45 @@ class Process(subprocess.Popen):
         self.args, self.expect = args, expect
         self.outdir = os.getcwd()
         self.outfile = os.path.abspath(self.unique(self.name))
-        self.out = open(self.outfile + '.out', 'w')
-        with open(self.outfile + '.cmd', 'w') as f: f.write("%s\n" % ' '.join(args))
         self.torndown = False
-        kwargs.setdefault('stdout', self.out)
-        kwargs.setdefault('stderr', subprocess.STDOUT)
-        args, self.valgrind_error = with_valgrind(args, self.outfile + '.vg')
-        try:
-            super(Process, self).__init__(args, **kwargs)
-        except Exception, e:
-            raise Exception("subprocess.Popen(%s, %s) failed: %s: %s" %
-                            (args, kwargs, type(e).__name__, e))
+        args = os.environ.get('QPID_DISPATCH_TEST_RUNNER', '').split() + args
+        with open(self.outfile + '.out', 'w') as out:
+            kwargs.setdefault('stdout', out)
+            kwargs.setdefault('stderr', subprocess.STDOUT)
+            try:
+                super(Process, self).__init__(args, **kwargs)
+                with open(self.outfile + '.cmd', 'w') as f:
+                    f.write("%s\npid=%s\n" % (' '.join(args), self.pid))
+            except Exception, e:
+                raise Exception("subprocess.Popen(%s, %s) failed: %s: %s" %
+                                (args, kwargs, type(e).__name__, e))
 
     def assert_running(self):
         """Assert that the proces is still running"""
-        assert self.poll() is None, "%s exited" % self.name
+        assert self.poll() is None, "%s: exited" % ' '.join(self.args)
 
     def teardown(self):
         """Check process status and stop the process if necessary"""
         if self.torndown:
             return
         self.torndown = True
+
+        def error(msg):
+            with open(self.outfile + '.out') as f:
+                raise RuntimeError("Process %s error: %s\n%s\n%s\n>>>>\n%s<<<<" % (
+                    self.pid, msg, ' '.join(self.args),
+                    self.outfile + '.cmd', f.read()));
+
         status = self.poll()
-        if status is None:    # still running
+        if status is None:      # Still running
             self.terminate()
-            rc = self.wait()
-            if rc is None:
-                self.kill()
-            if self.valgrind_error and rc == self.valgrind_error:
-                # Report that valgrind found errors
-                status = rc;
-        self.out.close()
-        self.check_exit(status)
-
-    def check_exit(self, status):
-        """Check process exit status"""
-        def check(condition, expect):
-            """assert condition with a suitable message for status"""
-            if status is None:
-                actual = "still running"
-            else:
-                actual = "exit %s"%status
-            assert condition, "Expected %s but %s: %s"%(expect, actual, self.name)
-        assert not self.valgrind_error or status != self.valgrind_error, \
-            "Valgrind errors (in %s)\n\n%s\n" % (self.outfile+".vg", open(self.outfile+".vg").read())
-        if self.expect == Process.RUNNING:
-            check(status is None, "still running")
-        elif self.expect == Process.EXIT_OK:
-            check(status == 0, "exit 0")
-        elif self.expect == Process.EXIT_FAIL:
-            check(status != 0, "exit non-0")
+            if self.expect != None and  self.expect != Process.RUNNING:
+                error("still running")
+            self.expect = 0     # Expect clean exit after terminate
+            status = self.wait()
+        if self.expect != None and self.expect != status:
+            error("exit code %s, expected %s" % (status, self.expect))
+
 
 class Config(object):
     """Base class for configuration objects that provide a convenient
@@ -556,7 +539,8 @@ class Tester(object):
                         break
             except Exception, e:
                 errors.append(e)
-        assert not errors, "Errors during teardown: \n%s" % "\n----".join([str(e) for e in errors])
+        if errors:
+            raise RuntimeError("Errors during teardown: \n\n%s" % "\n\n".join([str(e) for e in errors]))
 
 
     def cleanup(self, x):

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/9c7b5e93/tests/system_tests_http.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_http.py b/tests/system_tests_http.py
index 2dfc93d..5627277 100644
--- a/tests/system_tests_http.py
+++ b/tests/system_tests_http.py
@@ -83,8 +83,6 @@ class RouterTestHttp(TestCase):
         self.assertRaises(urllib2.URLError, urllib2.urlopen, "https://localhost:%d/nosuch" % r.ports[0])
 
     def test_https_get(self):
-        if run.use_valgrind(): self.skipTest("too slow for valgrind")
-
         def listener(**kwargs):
             args = dict(kwargs)
             args.update({'port': self.get_port(), 'httpRoot': os.path.dirname(__file__)})


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


[3/5] qpid-dispatch git commit: DISPATCH-739: Fix more use of qdr_delivery pointers after decref

Posted by ac...@apache.org.
DISPATCH-739: Fix more use of qdr_delivery pointers after decref


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

Branch: refs/heads/master
Commit: af6c53eda1bad646a99a88240f9b18e62865d3aa
Parents: 9c7b5e9
Author: Alan Conway <ac...@redhat.com>
Authored: Tue Apr 25 17:24:38 2017 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Apr 25 17:52:46 2017 -0400

----------------------------------------------------------------------
 src/router_core/connections.c | 33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/af6c53ed/src/router_core/connections.c
----------------------------------------------------------------------
diff --git a/src/router_core/connections.c b/src/router_core/connections.c
index c0c5b0c..20bcf56 100644
--- a/src/router_core/connections.c
+++ b/src/router_core/connections.c
@@ -650,16 +650,17 @@ static void qdr_link_cleanup_CT(qdr_core_t *core, qdr_connection_t *conn, qdr_li
     //
     qdr_delivery_ref_t *ref = DEQ_HEAD(updated_deliveries);
     while (ref) {
-        qdr_delivery_decref_CT(core, ref->dlv);
-
         //
-        // Account for the lost reference from the Proton delivery
+        // Account for possible lost reference from the Proton delivery
         //
         if (!ref->dlv->cleared_proton_ref) {
-            qdr_delivery_decref_CT(core, ref->dlv);
             ref->dlv->cleared_proton_ref = true;
+            qdr_delivery_decref_CT(core, ref->dlv);
         }
-
+        //
+        // Now our reference
+        //
+        qdr_delivery_decref_CT(core, ref->dlv);
         qdr_del_delivery_ref(&updated_deliveries, ref);
         ref = DEQ_HEAD(updated_deliveries);
     }
@@ -683,18 +684,18 @@ static void qdr_link_cleanup_CT(qdr_core_t *core, qdr_connection_t *conn, qdr_li
         }
 
         //
-        // Account for the undelivered-list reference
-        //
-        qdr_delivery_decref_CT(core, dlv);
-
-        //
         // Account for the lost reference from the Proton delivery
         // for unsettled deliveries on incoming links
         //
         if (link->link_direction == QD_INCOMING && !dlv->settled && !dlv->cleared_proton_ref) {
-            qdr_delivery_decref_CT(core, dlv);
             dlv->cleared_proton_ref = true;
+            qdr_delivery_decref_CT(core, dlv);
         }
+        //
+        // Now the undelivered-list reference
+        //
+        qdr_delivery_decref_CT(core, dlv);
+
         dlv = DEQ_HEAD(undelivered);
     }
 
@@ -727,17 +728,17 @@ static void qdr_link_cleanup_CT(qdr_core_t *core, qdr_connection_t *conn, qdr_li
         }
 
         //
-        // Account for the unsettled-list reference
-        //
-        qdr_delivery_decref_CT(core, dlv);
-
-        //
         // Account for the lost reference from the Proton delivery
         //
         if (!dlv->cleared_proton_ref) {
             dlv->cleared_proton_ref = true;
             qdr_delivery_decref_CT(core, dlv);
         }
+        //
+        // Now the unsettled-list reference
+        //
+        qdr_delivery_decref_CT(core, dlv);
+
         dlv = DEQ_HEAD(unsettled);
     }
 


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


[5/5] qpid-dispatch git commit: NO-JIRA: Clean up out-of-date FIXME comments

Posted by ac...@apache.org.
NO-JIRA: Clean up out-of-date FIXME comments


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

Branch: refs/heads/master
Commit: 5e61dd9a92161ce164604d94ec827c0af52a4dc5
Parents: 3b1fe11
Author: Alan Conway <ac...@redhat.com>
Authored: Tue Mar 28 15:10:16 2017 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Apr 25 18:08:53 2017 -0400

----------------------------------------------------------------------
 python/qpid_dispatch_internal/management/agent.py | 1 -
 src/server_private.h                              | 2 --
 2 files changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/5e61dd9a/python/qpid_dispatch_internal/management/agent.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/management/agent.py b/python/qpid_dispatch_internal/management/agent.py
index 45b7d6f..71cc836 100644
--- a/python/qpid_dispatch_internal/management/agent.py
+++ b/python/qpid_dispatch_internal/management/agent.py
@@ -611,7 +611,6 @@ class EntityCache(object):
             for i in sorted(redundant, reverse=True):
                 events.pop(i)
 
-        # FIXME aconway 2014-10-23: locking is ugly, push it down into C code.
         self.qd.qd_dispatch_router_lock(self.agent.dispatch)
         try:
             events = []

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/5e61dd9a/src/server_private.h
----------------------------------------------------------------------
diff --git a/src/server_private.h b/src/server_private.h
index 576b5ec..49e70b2 100644
--- a/src/server_private.h
+++ b/src/server_private.h
@@ -35,8 +35,6 @@
 void qd_server_timer_pending_LH(qd_timer_t *timer);
 void qd_server_timer_cancel_LH(qd_timer_t *timer);
 
-/* FIXME aconway 2017-01-19: to include/server.h? */
-
 struct qd_dispatch_t* qd_server_dispatch(qd_server_t *server);
 
 const char* qd_connection_name(const qd_connection_t *c);


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