Skip to content

Switch integration tests to use the peer module#15222

Merged
lhoguin merged 14 commits intomainfrom
loic-peer-rabbit
Feb 2, 2026
Merged

Switch integration tests to use the peer module#15222
lhoguin merged 14 commits intomainfrom
loic-peer-rabbit

Conversation

@lhoguin
Copy link
Copy Markdown
Contributor

@lhoguin lhoguin commented Jan 7, 2026

The bulk of the PR is switching to peer to start RabbitMQ nodes, which has a number of advantages including efficiency and better control over the nodes (they stop when CT stops). But the PR also contains general CI improvements like no longer skipping on ssl certificate generation failure or node start failure in init which was likely happening since we stopped using Concourse. See individual commits for details.

@michaelklishin michaelklishin changed the title DO NOT MERGE Peer-enabled RabbitMQ in tests DO NOT MERGE Switch integration tests to use the peer module Jan 26, 2026
@lhoguin lhoguin force-pushed the loic-peer-rabbit branch 2 times, most recently from bb3c011 to 1f7cd41 Compare January 26, 2026 16:24
@mergify mergify bot added the make label Jan 27, 2026
@lhoguin lhoguin force-pushed the loic-peer-rabbit branch 23 times, most recently from 566e542 to 7c7bad1 Compare January 28, 2026 13:08
We get better control over the nodes and avoid issues
such as nodes still running after we Ctrl+C. This is
also faster although we might not see a difference in CI.

This is a first step to improving running RabbitMQ nodes
concurrently.
We do not need to wait for the node to fail to self discover
during boot because we will be setting up `meck` and cluster
right after that.
While it is not very important since the command is not
used often it is worth fixing.
We haven't needed it since 2019 and definitely don't with `peer`.
By using separate directories to generate intermediary files
instead of generating them with the exact same filename.
SECONDARY_DIST_VSN takes a version of RabbitMQ to download and
use for the SECONDARY_DIST environment. For example:

  SECONDARY_DIST_VSN=4.2.3

The dist environment is only setup once and is not downloaded
again as long as it remains available (ie not deleted).

By default the dist environments are in the secondary_dist/
folder at the root of the RabbitMQ repository. This location
can be changed using the SECONDARY_DIST_DIR variable which
must contain an absolute path to the directory. For example:

  SECONDARY_DIST_DIR=/home/`whoami`/rabbitmq/secondary_dist/

Combined we can run mixed version tests using a command like:

  SECONDARY_DIST_VSN=4.2.0 SECONDARY_DIST_DIR=/home/`whoami`/rabbitmq/secondary_dist/ make -C deps/rabbit ct

Although SECONDARY_DIST_DIR is best exported from your own
shell's rc file if you're going to use it, as this allows
sharing the same secondary_dist/ directory across all RabbitMQ
clones and worktrees.
@lhoguin lhoguin changed the title DO NOT MERGE Switch integration tests to use the peer module Switch integration tests to use the peer module Jan 29, 2026
@lhoguin lhoguin marked this pull request as ready for review January 29, 2026 16:08
@lhoguin lhoguin requested a review from dumbbell January 29, 2026 16:10
Copy link
Copy Markdown
Collaborator

@dumbbell dumbbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it with mixed-version testing locally and it works great!

I don’t see log messages mentionning the start of nodes in the common_test HTML reports. Could you please add some messages back?

The console output is back to the default verbose one. That’s fine with me, if you prefer it. I just wanted to note it.

I also made two small comments on the code itself below.

@lhoguin
Copy link
Copy Markdown
Contributor Author

lhoguin commented Jan 30, 2026

@dumbbell Tweaked as you asked, also did a tiny refactoring to badmatch on peer:start error instead of error({...}) (same result but code is cleaner this way). Note that peer:start doesn't start rabbit so if that fails we really want to crash. Rabbit is started after that.

@lhoguin
Copy link
Copy Markdown
Contributor Author

lhoguin commented Feb 2, 2026

Got OK from JSP in chat.

@lhoguin lhoguin merged commit 0c21d68 into main Feb 2, 2026
292 checks passed
@lhoguin lhoguin deleted the loic-peer-rabbit branch February 2, 2026 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants