Skip to content

[Mocha] Add RabbitMQ test helpers for broker faults and split the test collections - #10869

Merged
tobias-tengler merged 1 commit into
mainfrom
tte/mq-01-rabbitmq-test-helpers
Nov 11, 2026
Merged

tobias-tengler merged 1 commit into
mainfrom
tte/mq-01-rabbitmq-test-helpers

Conversation

@tobias-tengler

@tobias-tengler tobias-tengler commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Tests only. This adds the test infrastructure that the RabbitMQ pull requests further up this stack use, and it makes the RabbitMQ test projects faster.

Changes

  • New helpers: broker faults (BrokerFaults, VhostFaults), broker state (BrokerView), a TCP proxy (TcpProxy), Wait, and one ceiling for every wait for something a test expects (TestTimeouts.Signal). The behavior tests use it in place of a timeout field per class.
  • Eight test collections instead of one, each with a broker of its own. xunit.runner.json lets 12 collections run at the same time.
  • The helpers read connections from the management API and queue counts through a passive declare. Consumers, channels, connection state and unacknowledged counts still come from rabbitmqctl, because the management API shows them only after 1 to 5 seconds.

Result

The 491 existing tests of Mocha.Transport.RabbitMQ.Tests pass on the new helpers. Locally they take just under a minute, and 169 seconds on main.

No production code changes.


Part 1 of 14 of the stack that replaces #10543. It needs nothing from the other parts.

@tobias-tengler
tobias-tengler force-pushed the tte/mq-01-rabbitmq-test-helpers branch from 81f4c9f to 6ef91f0 Compare November 11, 2026 18:00
@tobias-tengler
tobias-tengler marked this pull request as ready for review November 11, 2026 19:16
@tobias-tengler
tobias-tengler merged commit 77e69c3 into main Nov 11, 2026
159 checks passed
@tobias-tengler
tobias-tengler deleted the tte/mq-01-rabbitmq-test-helpers branch November 11, 2026 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant