Skip to content

Commit

Permalink
fix: rabbitmq readiness probe (#375)
Browse files Browse the repository at this point in the history
Add pika AMQPConnectionError to transient errors

fixes #348

---------

Co-authored-by: David Ankin <daveankin@gmail.com>
  • Loading branch information
jonathandannenberg and alexanderankin committed Mar 5, 2024
1 parent 750e12a commit 71cb75b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/rabbitmq/testcontainers/rabbitmq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 71cb75b

Please sign in to comment.