summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/list_indexes_with_build_uuids.js
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2019-11-25 19:35:40 +0000
committerevergreen <evergreen@mongodb.com>2019-11-25 19:35:40 +0000
commit96be927c235887791941fe9cffc57c9d3e66df57 (patch)
tree7db5be05774b4b66f05f74989583af9ec3ea3e8d /jstests/noPassthrough/list_indexes_with_build_uuids.js
parent89f957a37ec7474b83893a5b5aea60ed84f77403 (diff)
downloadmongo-96be927c235887791941fe9cffc57c9d3e66df57.tar.gz
SERVER-44822 update indexing tests to avoid slow op logging
Diffstat (limited to 'jstests/noPassthrough/list_indexes_with_build_uuids.js')
-rw-r--r--jstests/noPassthrough/list_indexes_with_build_uuids.js22
1 files changed, 13 insertions, 9 deletions
diff --git a/jstests/noPassthrough/list_indexes_with_build_uuids.js b/jstests/noPassthrough/list_indexes_with_build_uuids.js
index 938ffa67a76..b1a95b5dbd6 100644
--- a/jstests/noPassthrough/list_indexes_with_build_uuids.js
+++ b/jstests/noPassthrough/list_indexes_with_build_uuids.js
@@ -24,17 +24,21 @@ function addTestDocuments(db) {
assert.commandWorked(bulk.execute());
}
-let replSet = new ReplSetTest({name: "indexBuilds", nodes: 2});
-let nodes = replSet.nodeList();
-
-replSet.startSet({startClean: true});
-replSet.initiate({
- _id: "indexBuilds",
- members: [
- {_id: 0, host: nodes[0]},
- {_id: 1, host: nodes[1], votes: 0, priority: 0},
+const replSet = new ReplSetTest({
+ nodes: [
+ {},
+ {
+ // Disallow elections on secondary.
+ rsConfig: {
+ priority: 0,
+ votes: 0,
+ },
+ slowms: 30000, // Don't log slow operations on secondary. See SERVER-44821.
+ },
]
});
+const nodes = replSet.startSet();
+replSet.initiate();
let primary = replSet.getPrimary();
let primaryDB = primary.getDB(dbName);