TOOLS-4263 Add multi-node replica set test infrastructure - #1142
Draft
autarch wants to merge 1 commit into
Conversation
This was referenced Aug 20, 2026
Collaborator
Author
This was referenced Aug 20, 2026
autarch
force-pushed
the
08-17-tools-4263_convert_the_system_ca_tls_test_to_go
branch
from
August 25, 2026 15:30
b70c01b to
ed1c794
Compare
autarch
force-pushed
the
08-17-tools-4263_add_multi_node_replica_set_test_infrastructure
branch
from
August 25, 2026 15:30
a59cd1a to
639a760
Compare
This was referenced Aug 25, 2026
autarch
force-pushed
the
08-17-tools-4263_convert_the_system_ca_tls_test_to_go
branch
from
August 25, 2026 20:10
ed1c794 to
d959b7e
Compare
autarch
force-pushed
the
08-17-tools-4263_add_multi_node_replica_set_test_infrastructure
branch
from
August 25, 2026 20:10
639a760 to
0fff3fe
Compare
Adds a test type and a CI task for tests that need more than one data-bearing
node: a secondary to connect to, or a write concern greater than w:1. No tests
use it yet; the conversions that do follow in later commits.
- `common/testtype/types.go` - adds `MultiNodeReplSetTestType`
(`TOOLS_TESTING_MULTINODE_REPLSET`). Additive to `common/`, so no API change,
but `common/` is used by other projects at MongoDB.
- `buildscript/build.go` - `-topology=multiNodeReplSet` sets both
`TOOLS_TESTING_REPLSET` and `TOOLS_TESTING_MULTINODE_REPLSET`, since a
three-node set satisfies the single-node replica set tests too.
- `common.yml` - adds the `integration-multinode-latest` task, modeled on
`integration-latest-cluster`: the latest server, a three-node set, TLS, and
`test:integration -ssl=true -topology=multiNodeReplSet`. It is tagged
`multinode` rather than `latest`, because a `latest` tag would pull it into
every variant selecting `.latest`, and it runs on `rhel88` only.
- `scripts/create-repl-set.sh` - the node count comes from `REPLSET_NODES`,
defaulting to 1, so the existing single-node callers are unaffected.
With more than one node, the set is initiated with `priority = 2` on member 0.
Everything in CI connects to `localhost:${mongod_port}`, which is the set's
first node, so that node has to be the primary; without this, an election that
picks any other node fails every write in the integration suite, not just the
multi-node tests. Verified locally that a three-node set does elect another
node when nothing biases the config.
- `scripts/wait-for-cluster.sh` - with more than one node, also waits for the node
behind `MONGOD_PORT` to report `ismaster`. Waiting only for the port to accept
connections lets tests start while the election is still in progress.
autarch
force-pushed
the
08-17-tools-4263_convert_the_system_ca_tls_test_to_go
branch
from
August 25, 2026 20:18
d959b7e to
867d660
Compare
autarch
force-pushed
the
08-17-tools-4263_add_multi_node_replica_set_test_infrastructure
branch
from
August 25, 2026 20:18
0fff3fe to
23e1e6a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds a test type and a CI task for tests that need more than one data-bearing
node: a secondary to connect to, or a write concern greater than w:1. No tests
use it yet; the conversions that do follow in later commits.
common/testtype/types.go- addsMultiNodeReplSetTestType(
TOOLS_TESTING_MULTINODE_REPLSET). Additive tocommon/, so no API change,but
common/is used by other projects at MongoDB.buildscript/build.go--topology=multiNodeReplSetsets bothTOOLS_TESTING_REPLSETandTOOLS_TESTING_MULTINODE_REPLSET, since athree-node set satisfies the single-node replica set tests too.
common.yml- adds theintegration-multinode-latesttask, modeled onintegration-latest-cluster: the latest server, a three-node set, TLS, andtest:integration -ssl=true -topology=multiNodeReplSet. It is taggedmultinoderather thanlatest, because alatesttag would pull it intoevery variant selecting
.latest, and it runs onrhel88only.scripts/create-repl-set.sh- the node count comes fromREPLSET_NODES,defaulting to 1, so the existing single-node callers are unaffected.
With more than one node, the set is initiated with
priority = 2on member 0.Everything in CI connects to
localhost:${mongod_port}, which is the set'sfirst node, so that node has to be the primary; without this, an election that
picks any other node fails every write in the integration suite, not just the
multi-node tests. Verified locally that a three-node set does elect another
node when nothing biases the config.
scripts/wait-for-cluster.sh- with more than one node, also waits for the nodebehind
MONGOD_PORTto reportismaster. Waiting only for the port to acceptconnections lets tests start while the election is still in progress.