fix: remove sleep commands
This commit is contained in:
parent
5ff65f2cf4
commit
7559118822
@ -261,6 +261,7 @@ async def test_rabbitmq_handler():
|
||||
handler = RabbitMQHandler(connection_params, tenant_service_url, dummy_message_processor)
|
||||
|
||||
await handler.connect()
|
||||
await handler.initialize_tenant_queues()
|
||||
await handler.setup_tenant_queue()
|
||||
|
||||
# Test tenant creation
|
||||
@ -271,17 +272,11 @@ async def test_rabbitmq_handler():
|
||||
)
|
||||
logger.info(f"Sent create tenant message for {tenant_id}")
|
||||
|
||||
# Wait for tenant queue creation
|
||||
await asyncio.sleep(2)
|
||||
|
||||
# Test service request
|
||||
service_request = upload_json_and_make_message_body(tenant_id)
|
||||
await handler.input_exchange.publish(Message(body=json.dumps(service_request).encode()), routing_key=tenant_id)
|
||||
logger.info(f"Sent service request for {tenant_id}")
|
||||
|
||||
# Wait for message processing
|
||||
await asyncio.sleep(5)
|
||||
|
||||
# Test tenant deletion
|
||||
delete_message = tenant_event_message(tenant_id)
|
||||
await handler.tenant_exchange.publish(
|
||||
@ -289,9 +284,6 @@ async def test_rabbitmq_handler():
|
||||
)
|
||||
logger.info(f"Sent delete tenant message for {tenant_id}")
|
||||
|
||||
# Wait for tenant queue deletion
|
||||
await asyncio.sleep(2)
|
||||
|
||||
await handler.connection.close()
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user