diff options
author | Vishnu Kaushik <vishnu.kaushik@mongodb.com> | 2019-07-24 13:10:02 -0400 |
---|---|---|
committer | Vishnu Kaushik <vishnu.kaushik@mongodb.com> | 2019-07-24 13:52:17 -0400 |
commit | 45ff40ff0f2a2d7664a38acd06bfb4f4fe235267 (patch) | |
tree | f098e1bd63b9872b0f9ef601c46c408f3c8c695b /jstests/auth | |
parent | f38eabe384361ca989df73526971a30fe40ffca5 (diff) | |
download | mongo-45ff40ff0f2a2d7664a38acd06bfb4f4fe235267.tar.gz |
SERVER-42129 modifies test to account for ephemeralForTest engine's missing oplog after restart.
Diffstat (limited to 'jstests/auth')
-rw-r--r-- | jstests/auth/lib/commands_lib.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js index 5a81cde2473..1a49b0a5c6b 100644 --- a/jstests/auth/lib/commands_lib.js +++ b/jstests/auth/lib/commands_lib.js @@ -3962,11 +3962,18 @@ var authCommandsLib = { command: {insert: "oplog.rs", documents: [{ts: Timestamp()}]}, skipSharded: true, setup: function(db) { + load("jstests/libs/storage_engine_utils.js"); if (!db.getCollectionNames().includes("oplog.rs")) { assert.commandWorked( db.runCommand({create: "oplog.rs", capped: true, size: 10000})); } else { - assert.commandWorked(db.adminCommand({replSetResizeOplog: 1, size: 10000})); + if (storageEngineIsWiredTigerOrInMemory()) { + assert.commandWorked(db.adminCommand({replSetResizeOplog: 1, size: 10000})); + } else { + assert.commandWorked(db.runCommand({drop: "oplog.rs"})); + assert.commandWorked( + db.runCommand({create: "oplog.rs", capped: true, size: 10000})); + } } }, teardown: function(db) { |