summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/timestamp_index_builds.js
diff options
context:
space:
mode:
authorVesselina Ratcheva <vesselina.ratcheva@10gen.com>2020-02-14 16:17:33 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-18 18:27:39 +0000
commit34dc015fcb40b8e4c2c99aadf1a78d7b64de6146 (patch)
tree62716f0181b9f755cce63ee6ad55ad1d0f42a636 /jstests/noPassthrough/timestamp_index_builds.js
parentc18271eaf8bf8a85549ffec363748b40e57b9392 (diff)
downloadmongo-34dc015fcb40b8e4c2c99aadf1a78d7b64de6146.tar.gz
SERVER-45610 Reject commands that read data when node is in RECOVERING state
This reverts commit 542de84ec1e17520bd0d99d54a024ff0e0bc3de2. create mode 100644 jstests/libs/all_commands_test.js create mode 100644 jstests/replsets/db_reads_while_recovering_all_commands.js
Diffstat (limited to 'jstests/noPassthrough/timestamp_index_builds.js')
-rw-r--r--jstests/noPassthrough/timestamp_index_builds.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/noPassthrough/timestamp_index_builds.js b/jstests/noPassthrough/timestamp_index_builds.js
index 89f7214b6de..6421c2cbaa5 100644
--- a/jstests/noPassthrough/timestamp_index_builds.js
+++ b/jstests/noPassthrough/timestamp_index_builds.js
@@ -32,7 +32,7 @@ const rst = new ReplSetTest({
nodeOptions: {setParameter: {logComponentVerbosity: tojsononeline({storage: {recovery: 2}})}}
});
const nodes = rst.startSet();
-rst.initiate();
+rst.initiateWithHighElectionTimeout();
if (!rst.getPrimary().adminCommand("serverStatus").storageEngine.supportsSnapshotReadConcern) {
// Only snapshotting storage engines require correct timestamping of index builds.
@@ -84,6 +84,7 @@ for (let nodeIdx = 0; nodeIdx < 2; ++nodeIdx) {
{
jsTestLog("Starting as a replica set. Both indexes should exist. Node: " + nodeIdentity);
let conn = rst.start(nodeIdx, {startClean: false}, true);
+ rst.waitForState(conn, ReplSetTest.State.SECONDARY);
conn.setSlaveOk();
IndexBuildTest.assertIndexes(getColl(conn), 2, ['_id_', 'foo_1']);
rst.stop(nodeIdx);