From 4eecce4ee5318a713039fbed97bd360c9fc5cd57 Mon Sep 17 00:00:00 2001 From: "Patrick M. Niedzielski" Date: Mon, 22 Jul 2024 15:36:49 -0400 Subject: [PATCH] tests: Extend producer example test with additional checks This patch extends the `test_examples.py` integration test for the simple producer example with two additional checks inspired by the new producer-with-correlation example test. First, we make sure that the producer process completes successfully. Second, we verify that it only sent one message to the consumer while it was alive. Signed-off-by: Patrick M. Niedzielski --- tests/integration/test_examples.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/test_examples.py b/tests/integration/test_examples.py index f0dc5fd..3514f2e 100644 --- a/tests/integration/test_examples.py +++ b/tests/integration/test_examples.py @@ -82,6 +82,8 @@ def test_example_producer(unique_queue): # THEN session.stop() + process.wait() + assert q.empty() assert msg.data == b"\xde\xad\x00\x00\xbe\xef" assert msg.queue_uri == unique_queue assert msg.properties == {}