summaryrefslogtreecommitdiff
path: root/jstests/replsets/apply_ops_create_indexes.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/replsets/apply_ops_create_indexes.js')
-rw-r--r--jstests/replsets/apply_ops_create_indexes.js31
1 files changed, 1 insertions, 30 deletions
diff --git a/jstests/replsets/apply_ops_create_indexes.js b/jstests/replsets/apply_ops_create_indexes.js
index 4fe813b5ed4..f400265afb0 100644
--- a/jstests/replsets/apply_ops_create_indexes.js
+++ b/jstests/replsets/apply_ops_create_indexes.js
@@ -1,6 +1,5 @@
/* This test ensures that indexes created by running applyOps are successfully replicated (see
- * SERVER-31435). Both insertion into system.indexes and createIndexes style oplog entries are
- * passed to applyOps here.
+ * SERVER-31435).
*/
(function() {
"use strict";
@@ -70,33 +69,5 @@
ensureIndexExists(secondaryTestDB, collName, cmdFormatIndexName, 2);
}
- // Create an index by inserting into system.indexes in applyOps.
- let insertFormatIndexName = "b_1";
- cmd = {
- applyOps: [{
- "op": "i",
- "ns": dbName + ".system.indexes",
- "o": {
- ns: dbName + "." + collName,
- key: {b: 1},
- name: insertFormatIndexName,
- }
- }]
- };
- res = primaryTestDB.adminCommand(cmd);
- assert.commandWorked(res, "could not run " + tojson(cmd));
- rst.awaitReplication();
- ensureIndexExists(primaryTestDB, collName, insertFormatIndexName, 3);
-
- // Make sure the index was replicated to the secondaries.
- secondaries = rst.getSecondaries();
- for (let j = 0; j < secondaries.length; j++) {
- let secondaryTestDB = secondaries[j].getDB(dbName);
- ensureIndexExists(secondaryTestDB, collName, insertFormatIndexName, 3);
- }
-
- localDB = rst.getPrimary().getDB("local");
- ensureOplogEntryExists(localDB, insertFormatIndexName);
-
rst.stopSet();
}());