-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Testing Infrastructure
-
Fully Compatible
-
TIG 2017-09-11
The ReplicaSetFixture in resmoke.py configures the replica set such that the first node is always the primary by making all other nodes have a priority of zero. In order to meaningfully support failovers, the ReplicaSetFixture class should be changed to have an option where all nodes are electable.
- An all_nodes_electable parameter should be added to the ReplicaSetFixture constructor. The parameter should default to false in order to avoid needing to change any existing usages of the ReplicaSetFixture class by other test suites.
- Change JSTestCase#configure() and JSONSchemaTestCase#configure() to use a MongoDB connection URI rather than using the ReplicaSetFixture#port attribute and the --port option to the mongo shell. Note: This behavior may be implemented under
SERVER-19541. - Update ReplicaSetFixture#get_primary() to take an optional timeout parameter. The implementation should be changed to do a round of "isMaster" requests and wait until a primary becomes available or the specified period has expired. A ServerFailure exception should be raised if none of the nodes report being the primary.
- Update ReplicaSetFixture#setup() to explicitly use ReplicaSetFixture#nodes[0] since the first node is initiated in a replica set by itself so the other nodes are able to transition to the SECONDARY state more quickly.
- is depended on by
-
SERVER-31194 Add a version of retryable_writes_jscore_passthrough.yml with stepdowns
- Closed
- is duplicated by
-
SERVER-21718 Add option to resmoke.py to allow stepDown and stepUp
- Closed