kgiusti commented on a change in pull request #1232: URL: https://github.com/apache/qpid-dispatch/pull/1232#discussion_r640828521
##########
File path: tests/system_test.py
##########
@@ -1013,8 +1018,16 @@ def on_link_closing(self, event):
rcv = event.container.create_receiver(event.connection,
**kwargs)
+ def queue_put(self, msg):
Review comment:
You can avoid changing the API (and all those other files) by creating
an internal class to the AsyncTestReceiver that inherits from Queue and
overrides get() and put() to do what you want.
Something like:
class _MyQueue(Queue):
def __init__(self, receiver):
self._async_receiver = receiver
super(_MyQueue, self).__init__()
def get(self, timeout=TIMEOUT):
self._async_receiver.num_queue_gets +=1
super(_MyQueue, self).get(timeout)
def put(self, msg):
self._async_receiver.num_queue_puts +=1
super(_MyQueue, self).put(msg)
then in the async receiver's __init__:
self.queue = _MyQueue(self)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
