Skip to content

Commit

Permalink
tests: Extend producer example test with additional checks
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
pniedzielski committed Jan 14, 2025
1 parent 1875de0 commit 4eecce4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/integration/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 == {}
Expand Down

0 comments on commit 4eecce4

Please sign in to comment.