diff --git a/modules/rabbitmq/testcontainers/rabbitmq/__init__.py b/modules/rabbitmq/testcontainers/rabbitmq/__init__.py index 6c26518c..0a548602 100644 --- a/modules/rabbitmq/testcontainers/rabbitmq/__init__.py +++ b/modules/rabbitmq/testcontainers/rabbitmq/__init__.py @@ -51,7 +51,7 @@ def __init__( self.with_env("RABBITMQ_DEFAULT_USER", self.username) self.with_env("RABBITMQ_DEFAULT_PASS", self.password) - @wait_container_is_ready(pika.exceptions.IncompatibleProtocolError) + @wait_container_is_ready(pika.exceptions.IncompatibleProtocolError, pika.exceptions.AMQPConnectionError) def readiness_probe(self) -> bool: """Test if the RabbitMQ broker is ready.""" connection = pika.BlockingConnection(self.get_connection_params())