You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ch...@apache.org on 2018/07/20 14:59:02 UTC

[1/4] qpid-dispatch git commit: DISPATCH-993: delete unused duplicate object

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 8634429fa -> 2d6bef53a


DISPATCH-993: delete unused duplicate object


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

Branch: refs/heads/master
Commit: 239afaef449bc3a611a30dce4c58d78389935a38
Parents: 8634429
Author: Chuck Rolke <cr...@redhat.com>
Authored: Thu Jul 19 10:01:38 2018 -0400
Committer: Chuck Rolke <cr...@redhat.com>
Committed: Fri Jul 20 10:00:02 2018 -0400

----------------------------------------------------------------------
 tests/system_tests_topology_disposition.py | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/239afaef/tests/system_tests_topology_disposition.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_topology_disposition.py b/tests/system_tests_topology_disposition.py
index 035ba7e..a5cf251 100644
--- a/tests/system_tests_topology_disposition.py
+++ b/tests/system_tests_topology_disposition.py
@@ -538,11 +538,6 @@ class DeleteSpuriousConnector ( MessagingHandler ):
             self.D_management_helper = ManagementMessageHelper ( event.receiver.remote_source.address )
 
 
-    def on_released ( self, event ) :
-        # The test fails.
-        self.bail ( "a message was released" )
-
-
     def run(self):
         Container(self).run()
 


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


[4/4] qpid-dispatch git commit: DISPATCH-993: Use different non-default cost for each connector

Posted by ch...@apache.org.
DISPATCH-993: Use different non-default cost for each connector

Reading the log files is easier when each inter-router link can
be identified easily.

* If default values for connector costs are used then
the Open frames do not contain the qd.inter-router-cost
property. By specifying non-defaults each Open has a property
field that identifies the peer router.

* When each link uses a different cost it's obvious which link
is being set up.


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

Branch: refs/heads/master
Commit: 2d6bef53ac984e4cd5fe0afb0eeb7495f93a991d
Parents: 75d9c17
Author: Chuck Rolke <cr...@redhat.com>
Authored: Fri Jul 20 10:51:06 2018 -0400
Committer: Chuck Rolke <cr...@redhat.com>
Committed: Fri Jul 20 10:56:25 2018 -0400

----------------------------------------------------------------------
 tests/system_tests_topology_disposition.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/2d6bef53/tests/system_tests_topology_disposition.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_topology_disposition.py b/tests/system_tests_topology_disposition.py
index 9aa7276..e1e1328 100644
--- a/tests/system_tests_topology_disposition.py
+++ b/tests/system_tests_topology_disposition.py
@@ -180,25 +180,25 @@ class TopologyDispositionTests ( TestCase ):
         #  Tail of arrow indicates initiator of connection.
         #  (The diagonal connections do not look very much like arrows, I fear...)
         #
-        #                1
+        #                2
         #         D ----------> A
         #         | \         > ^
         #         | 20\   50/   |
         #         |     \ /     |
-        #      1  |     / \     | 100
+        #      3  |     / \     | 100
         #         |   /     \   |
         #         v /         > |
         #         C ----------> B
-        #                1
+        #                4
         #
 
         cls.cost = dict()
         cls.cost [ 'AB' ] = 100
         cls.cost [ 'AC' ] =  50
-        cls.cost [ 'AD' ] =   1
-        cls.cost [ 'BC' ] =   1
+        cls.cost [ 'AD' ] =   2
+        cls.cost [ 'BC' ] =   4
         cls.cost [ 'BD' ] =  20
-        cls.cost [ 'CD' ] =   1
+        cls.cost [ 'CD' ] =   3
 
         # Add an extra, high-cost connection between A and D.
         # This will be deleted in the first test. Note that


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


[3/4] qpid-dispatch git commit: DISPATCH-993: Send transmit batches more frequently

Posted by ch...@apache.org.
DISPATCH-993: Send transmit batches more frequently

Messages are more likely to be released during Link State transitions.
By transmitting messages during the transitions the test gets a
better mix of received and released messages.

A side benefit is that it saves ~40 seconds per test run.


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

Branch: refs/heads/master
Commit: 75d9c17a6600890282645340f1b399a1f0982e6d
Parents: 3d248c1
Author: Chuck Rolke <cr...@redhat.com>
Authored: Fri Jul 20 10:24:22 2018 -0400
Committer: Chuck Rolke <cr...@redhat.com>
Committed: Fri Jul 20 10:24:22 2018 -0400

----------------------------------------------------------------------
 tests/system_tests_topology_disposition.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/75d9c17a/tests/system_tests_topology_disposition.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_topology_disposition.py b/tests/system_tests_topology_disposition.py
index daba701..9aa7276 100644
--- a/tests/system_tests_topology_disposition.py
+++ b/tests/system_tests_topology_disposition.py
@@ -530,7 +530,7 @@ class DeleteSpuriousConnector ( MessagingHandler ):
             Stopwatch ( name = stopwatch_name, \
                         timer = event.reactor.schedule(init_time, Timeout(self, stopwatch_name)), \
                         initial_time = init_time, \
-                        repeat_time = 0.5 \
+                        repeat_time = 0.1 \
                       )
 
         self.sender_connection   = event.container.connect ( self.client_addrs['A'] )
@@ -748,7 +748,7 @@ class TopologyDisposition ( MessagingHandler ):
         self.client_addrs         = client_addrs
         self.timeout_count        = 0
         self.confirmed_kills      = 0
-        self.send_interval        = 0.5
+        self.send_interval        = 0.1
         self.to_be_sent           = 700
         self.deadline             = 100
         self.message_status       = dict()


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


[2/4] qpid-dispatch git commit: DISPATCH-993: Get test to complete in when messages are released

Posted by ch...@apache.org.
DISPATCH-993: Get test to complete in when messages are released

This commit is the heart of the Jira fix.

If enough messages are released then the test never sends enough
messages to trigger the spurious link deletion.
The send count is now (n_messages + n_released).

Test 01 debug reports the number and time elapsed for leading
released messages in the message stream.


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

Branch: refs/heads/master
Commit: 3d248c11d54a41b2efb20cf0b60a113e39f48aa9
Parents: 239afae
Author: Chuck Rolke <cr...@redhat.com>
Authored: Fri Jul 20 10:13:35 2018 -0400
Committer: Chuck Rolke <cr...@redhat.com>
Committed: Fri Jul 20 10:13:35 2018 -0400

----------------------------------------------------------------------
 tests/system_tests_topology_disposition.py | 57 +++++++++++++++++++------
 1 file changed, 45 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3d248c11/tests/system_tests_topology_disposition.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_topology_disposition.py b/tests/system_tests_topology_disposition.py
index a5cf251..daba701 100644
--- a/tests/system_tests_topology_disposition.py
+++ b/tests/system_tests_topology_disposition.py
@@ -201,7 +201,19 @@ class TopologyDispositionTests ( TestCase ):
         cls.cost [ 'CD' ] =   1
 
         # Add an extra, high-cost connection between A and D.
-        # This will be deleted in the first test.
+        # This will be deleted in the first test. Note that
+        # "more than one inter-router connections between two
+        # routers" is _not_ a supported configuration.
+        # Any of the connections may be used and the others are
+        # ignored. The multiple connections do not act as a
+        # "hot standby" nor as a "trunking" setup where the
+        # traffic between the routers is shared across the 
+        # connections.
+        # If the active connection is lost then the multiple
+        # connections are all considered for election and one
+        # of them is chosen. The router does not seamlessly 
+        # transfer the load to the unaffected connection.
+
         cls.cost [ 'AD2' ] =  11
 
         client_link_capacity       = 1000
@@ -405,6 +417,12 @@ class TopologyDispositionTests ( TestCase ):
 
 class DeleteSpuriousConnector ( MessagingHandler ):
     """
+    Connect receiver (to B) and sender (to A) to router network.
+    Start sending batches of messages to router A.
+    Messages are released by router D until the route mobile
+    address closest/0 is propagated to router D.
+    Once messages are accepted then the route is fully established
+    and messages must not be released after that.
     """
     def __init__ ( self, test_name, client_addrs, destination, D_client_addr ):
         super ( DeleteSpuriousConnector, self).__init__(prefetch=100)
@@ -438,6 +456,9 @@ class DeleteSpuriousConnector ( MessagingHandler ):
 
         self.confirmed_kill = False
 
+        self.first_released          = None
+        self.first_received          = None
+
 
     def debug_print ( self, text ) :
         if self.debug == True:
@@ -458,7 +479,7 @@ class DeleteSpuriousConnector ( MessagingHandler ):
 
     # Call this from all handlers of dispositions returning to the sender.
     def bail_out_if_done ( self ) :
-        if self.n_accepted + self.n_released >= self.n_messages  :
+        if self.n_accepted + self.n_released >= self.max_to_send()  :
             # We have received everything. But! Did we get a confirmed kill on the connector?
             if not self.confirmed_kill :
                 # This is a failure.
@@ -564,29 +585,44 @@ class DeleteSpuriousConnector ( MessagingHandler ):
     # Sender Side
     #=======================================================
 
+    def max_to_send ( self ) :
+        return self.n_messages + self.n_released
+
+
     def send ( self ) :
 
-        if self.n_sent >= self.n_messages :
+        if self.n_sent >= self.max_to_send() :
             return
 
         for _ in range ( self.burst_size ) :
-            if self.sender.credit > 0 and self.n_sent < self.n_messages :
-                msg = Message ( body=self.n_sent )
-                self.n_sent += 1
-                self.sender.send ( msg )
-                self.debug_print ( "sent: %d" % self.n_sent )
+            if self.sender.credit > 0 :
+                if self.n_sent < self.max_to_send() :
+                    msg = Message ( body=self.n_sent )
+                    self.n_sent += 1
+                    self.sender.send ( msg )
+                    self.debug_print ( "sent: %d" % self.n_sent )
+                else :
+                    pass
             else :
                 self.debug_print ( "sender has no credit." )
 
 
-    def on_accepted ( self, event ):
+    def on_accepted ( self, event ) :
+        if self.first_received is None :
+            self.first_received = time.time()
+            if not self.first_released is None :
+                self.debug_print ( "Accepted first message. %d messages released in %.6lf seconds" % \
+                    ( self.n_released, self.first_received - self.first_released ) )
         self.n_accepted += 1
         self.debug_print ( "on_accepted %d" % self.n_accepted )
         self.bail_out_if_done ( )
 
 
     def on_released ( self, event ) :
+        if self.first_released is None :
+            self.first_released = time.time()
         self.n_released += 1
+        self.receiver.flow ( 1 )
         self.debug_print ( "on_released %d" % self.n_released )
         self.bail_out_if_done ( )
 
@@ -606,9 +642,6 @@ class DeleteSpuriousConnector ( MessagingHandler ):
                 self.kill_the_connector ( )
 
 
-
-
-
 class TopologyDisposition ( MessagingHandler ):
     """
     Test that disposition guarantee survives catastrophic


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