diff --git a/jstests/replsets/too_stale_secondary.js b/jstests/replsets/too_stale_secondary.js
|
index 1ee6400ebc4..d8bc2c0f11e 100644
|
--- a/jstests/replsets/too_stale_secondary.js
|
+++ b/jstests/replsets/too_stale_secondary.js
|
@@ -93,8 +93,8 @@ replTest.initiate({
|
_id: testName,
|
members: [
|
{_id: 0, host: nodes[0].host},
|
- {_id: 1, host: nodes[1].host, priority: 0},
|
- {_id: 2, host: nodes[2].host, priority: 0}
|
+ {_id: 1, host: nodes[1].host, priority: 1},
|
+ {_id: 2, host: nodes[2].host, priority: 1}
|
]
|
});
|
|
@@ -139,6 +139,17 @@ assert.soon(() => myState(replTest.nodes[2]) === ReplSetTest.State.RECOVERING,
|
// This waits for the state as indicated by the primary node.
|
replTest.waitForState(replTest.nodes[2], ReplSetTest.State.RECOVERING);
|
|
+jsTestLog("Begin test");
|
+assert.commandWorked(
|
+ replTest.getPrimary().adminCommand({setParameter: 1, mirrorReads: {samplingRate: 1.0}}));
|
+
|
+for (var i = 0; i < 100; ++i) {
|
+ primaryTestDB.runCommand({find: collName, filter: {}});
|
+}
|
+jsTestLog("Mid test");
|
+replTest.nodes[2].getDB('test').runCommand({find: 'test', filter: {}});
|
+jsTestLog("End test");
|
+
|
jsTestLog("7: Stop and restart Node 2.");
|
replTest.stop(2);
|
replTest.restart(2, {
|