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
@@ -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,9 +2335,10 @@ class ClosestTest ( MessagingHandler ):
def on_sendable ( self, event ):
+ # 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
- )
+ address = self.dest)
event.sender.send ( msg )
