Skip to content

🐛 Ensure the PubSubFixture waits for all published messages - #188

Merged
flovouin merged 5 commits into
mainfrom
fix/pubsub-testing-wait
Jul 31, 2026
Merged

🐛 Ensure the PubSubFixture waits for all published messages#188
flovouin merged 5 commits into
mainfrom
fix/pubsub-testing-wait

Conversation

@flovouin

@flovouin flovouin commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

📝 Description of the PR

The PubSubFixture waits for all the messages published during a test to be received by its subscriptions before clearing them, or before checking that no message was published. This wait was ineffective: several expected messages could be satisfied by a single received one, such that the fixture stopped waiting as soon as the first message arrived. Messages still in flight could then leak into the next test, or be missed by expectNoMessage.

The wait now requires as many received messages as there are published ones. Publishes that failed are excluded from that count, as the corresponding messages will never be received.

📋 Check list

  • 🧪 Unit tests have been written.
  • 📝 Documentation has been updated.

@flovouin flovouin added the bug Something isn't working label Jul 31, 2026
@flovouin
flovouin merged commit 8ca71ca into main Jul 31, 2026
2 checks passed
@flovouin
flovouin deleted the fix/pubsub-testing-wait branch July 31, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant