Skip to content

Commit

Permalink
add changelog entry, add pytest markers for rabbitmq integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ancalita committed Feb 23, 2024
1 parent 5a86011 commit 13f366b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog/13016.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Flush messages when Kafka producer is closed. This is to ensure that all messages in the producer's internal queue are sent to the broker.
3 changes: 3 additions & 0 deletions tests/integration_tests/core/brokers/test_pika.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
)


@pytest.mark.broker
async def test_pika_event_broker_connect():
broker = PikaEventBroker(
host=RABBITMQ_HOST,
Expand All @@ -31,6 +32,7 @@ async def test_pika_event_broker_connect():
await broker.close()


@pytest.mark.broker
@pytest.mark.xdist_group("rabbitmq")
async def test_pika_event_broker_publish_after_restart(
docker_client: docker.DockerClient,
Expand Down Expand Up @@ -102,6 +104,7 @@ async def test_pika_event_broker_publish_after_restart(
rabbitmq_container.remove()


@pytest.mark.broker
@pytest.mark.xdist_group("rabbitmq")
@pytest.mark.parametrize("host_component", ["localhost", "myuser:mypassword@localhost"])
async def test_pika_event_broker_connect_with_path_and_query_params_in_url(
Expand Down

0 comments on commit 13f366b

Please sign in to comment.