You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2019/09/06 17:10:13 UTC

[qpid-dispatch] branch master updated: DISPATCH-1408 - Made sure that the correct sender and not the management sender is used to send messages to the router. This will ensure that we are testing the closest distribution correctly

This is an automated email from the ASF dual-hosted git repository.

gmurthy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
     new bc06083  DISPATCH-1408 - Made sure that the correct sender and not the management sender is used to send messages to the router. This will ensure that we are testing the closest distribution correctly
bc06083 is described below

commit bc06083a429e1a3032b5da6f665f1c2c6e5e9d59
Author: Ganesh Murthy <gm...@apache.org>
AuthorDate: Fri Sep 6 13:09:35 2019 -0400

    DISPATCH-1408 - Made sure that the correct sender and not the management sender is used to send messages to the router. This will ensure that we are testing the closest distribution correctly
---
 tests/system_tests_distribution.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/system_tests_distribution.py b/tests/system_tests_distribution.py
index 0442095..c3be49c 100644
--- a/tests/system_tests_distribution.py
+++ b/tests/system_tests_distribution.py
@@ -2271,6 +2271,8 @@ class ClosestTest ( MessagingHandler ):
         self.bailed              = False
         self.test_name           = test_name
 
+        self.sender = None
+
     def timeout ( self ):
         self.bail ( "Timeout Expired " )
 
@@ -2333,10 +2335,11 @@ class ClosestTest ( MessagingHandler ):
 
 
     def on_sendable ( self, event ):
-        msg = Message ( body     = "Hello, closest.",
-                        address  = self.dest
-                      )
-        event.sender.send ( msg )
+        # Fix for DISPATCH-1408 - Make sure that the correct sender  is sending the messages to self.dest
+        if event.sender == self.sender:
+            msg = Message ( body     = "Hello, closest.",
+                            address  = self.dest)
+            event.sender.send ( msg )
 
 
     def on_message ( self, event ):


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