From d7b6fea48d13d7aac873b253c2902e56838768db Mon Sep 17 00:00:00 2001 From: l0lawrence Date: Tue, 19 Jul 2022 16:42:34 -0700 Subject: [PATCH 1/2] see test output --- sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py index d4825747facf..aea6f886a02e 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/client.py @@ -706,7 +706,8 @@ def _receive_message_batch_impl(self, max_batch_size=None, on_message_received=N if timeout and time.time() > timeout: break - receiving = self.do_work(batch=to_receive_size) + #removed to_receive_size + receiving = self.do_work() cur_queue_size = self._received_messages.qsize() # after do_work, check how many new messages have been received since previous iteration received = cur_queue_size - before_queue_size From 472d20da3635e0226a5d43ce84a0f973b78d495e Mon Sep 17 00:00:00 2001 From: l0lawrence Date: Tue, 19 Jul 2022 16:47:40 -0700 Subject: [PATCH 2/2] change on async --- .../azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py index 6904d3cbe77e..72461ccbba58 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_pyamqp/aio/_client_async.py @@ -632,7 +632,7 @@ async def _receive_message_batch_impl_async(self, max_batch_size=None, on_messag try: await asyncio.wait_for( - self.do_work_async(batch=to_receive_size), + self.do_work_async(), timeout=timeout_time - now_time if timeout else None ) except asyncio.TimeoutError: