summaryrefslogtreecommitdiff
path: root/jstests/replsets/sessions_collection_auto_healing.js
diff options
context:
space:
mode:
authorBlake Oler <blake.oler@mongodb.com>2018-10-10 10:48:11 -0400
committerBlake Oler <blake.oler@mongodb.com>2018-10-13 17:47:24 -0400
commit6894b72f134534c3739a66ed9eee11e265b9c1e1 (patch)
tree141d2c0600511357c8edf93ba5c4a7070be47b0f /jstests/replsets/sessions_collection_auto_healing.js
parentaa89fef4ac12249077ff8701b465d0b9f733fd2c (diff)
downloadmongo-6894b72f134534c3739a66ed9eee11e265b9c1e1.tar.gz
SERVER-36964 Prevent secondaries in SessionsCollectionRS from attempting to set up the sessions collection.
Diffstat (limited to 'jstests/replsets/sessions_collection_auto_healing.js')
-rw-r--r--jstests/replsets/sessions_collection_auto_healing.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/jstests/replsets/sessions_collection_auto_healing.js b/jstests/replsets/sessions_collection_auto_healing.js
index c56fb24639a..ed332241921 100644
--- a/jstests/replsets/sessions_collection_auto_healing.js
+++ b/jstests/replsets/sessions_collection_auto_healing.js
@@ -45,7 +45,7 @@ load('jstests/libs/sessions_collection.js');
validateSessionsCollection(secondary, false, false);
}
- // Test that a refresh on a secondary creates the sessions collection.
+ // Test that a refresh on a secondary does not create the sessions collection.
{
validateSessionsCollection(primary, false, false);
@@ -54,15 +54,13 @@ load('jstests/libs/sessions_collection.js');
assert.commandWorked(secondaryAdmin.runCommand({refreshLogicalSessionCacheNow: 1}));
- validateSessionsCollection(primary, true, true);
+ validateSessionsCollection(primary, false, false);
replTest.awaitReplication();
- validateSessionsCollection(secondary, true, true);
+ validateSessionsCollection(secondary, false, false);
}
// Test that a refresh on the primary creates the sessions collection.
{
- assert.commandWorked(primary.getDB("config").runCommand(
- {drop: "system.sessions", writeConcern: {w: "majority"}}));
validateSessionsCollection(primary, false, false);
replTest.awaitReplication();
@@ -73,7 +71,7 @@ load('jstests/libs/sessions_collection.js');
validateSessionsCollection(primary, true, true);
}
- // Test that a refresh on a secondary will create the TTL index on the sessions collection.
+ // Test that a refresh on a secondary will not create the TTL index on the sessions collection.
{
assert.commandWorked(primary.getDB("config").system.sessions.dropIndex({lastUse: 1}));
@@ -81,13 +79,11 @@ load('jstests/libs/sessions_collection.js');
assert.commandWorked(secondaryAdmin.runCommand({refreshLogicalSessionCacheNow: 1}));
- validateSessionsCollection(primary, true, true);
+ validateSessionsCollection(primary, true, false);
}
// Test that a refresh on the primary will create the TTL index on the sessions collection.
{
- assert.commandWorked(primary.getDB("config").system.sessions.dropIndex({lastUse: 1}));
-
validateSessionsCollection(primary, true, false);
assert.commandWorked(primaryAdmin.runCommand({refreshLogicalSessionCacheNow: 1}));