diff --git a/neon_mq_connector/utils/client_utils.py b/neon_mq_connector/utils/client_utils.py index 0a33369..13f935a 100644 --- a/neon_mq_connector/utils/client_utils.py +++ b/neon_mq_connector/utils/client_utils.py @@ -112,6 +112,7 @@ def handle_mq_response(channel: Channel, method, _, body): LOG.debug(f'MQ output: {api_output}') channel.basic_ack(delivery_tag=method.delivery_tag) if isinstance(api_output.get('_part'), int): + # TODO: Consider forcing these to be passed to `stream_callback` synchronously # Handle multi-part responses if stream_callback: # Pass each part to the stream callback method if defined diff --git a/tests/test_utils.py b/tests/test_utils.py index b25d481..b0749ca 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -128,6 +128,7 @@ def respond_multiple(channel, method, _, body): routing_key=reply_channel, body=dict_to_b64(response), properties=pika.BasicProperties(expiration='1000')) + time.sleep(0.5) # Used to ensure synchronous response handling channel.basic_ack(delivery_tag=method.delivery_tag)