summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/refresh_logical_session_cache_now.js
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2017-08-10 21:49:32 -0400
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2017-08-10 21:49:32 -0400
commit2bc6879661194e93320b7f24e4b9ba0ffd89d7c3 (patch)
treed008623c9a3717a9aa8a72f0b1d9b3bd311c169e /jstests/noPassthrough/refresh_logical_session_cache_now.js
parent3a6f7017c2577af96c377f1500998565737952e6 (diff)
downloadmongo-2bc6879661194e93320b7f24e4b9ba0ffd89d7c3.tar.gz
Revert "SERVER-29202 Add a refreshLogicalSessionCacheNow test command"
This reverts commit e1978af38dff725f0a0a60bca39a21b072751218.
Diffstat (limited to 'jstests/noPassthrough/refresh_logical_session_cache_now.js')
-rw-r--r--jstests/noPassthrough/refresh_logical_session_cache_now.js44
1 files changed, 0 insertions, 44 deletions
diff --git a/jstests/noPassthrough/refresh_logical_session_cache_now.js b/jstests/noPassthrough/refresh_logical_session_cache_now.js
deleted file mode 100644
index e3fe583f074..00000000000
--- a/jstests/noPassthrough/refresh_logical_session_cache_now.js
+++ /dev/null
@@ -1,44 +0,0 @@
-(function() {
- "use script";
-
- var res;
- var refresh = {refreshLogicalSessionCacheNow: 1};
- var startSession = {startSession: 1};
-
- // Start up a standalone server.
- var conn = MongoRunner.runMongod({nojournal: ""});
- var admin = conn.getDB("admin");
-
- // Trigger an initial refresh, as a sanity check.
- res = admin.runCommand(refresh);
- assert.commandWorked(res, "failed to refresh");
-
- // Start a session. Should not be in the collection yet.
- res = admin.runCommand(startSession);
- assert.commandWorked(res, "unable to start session");
-
- assert.eq(admin.system.sessions.count(), 0, "should not have session records yet");
-
- // Trigger a refresh. Session should now be in the collection.
- res = admin.runCommand(refresh);
- assert.commandWorked(res, "failed to refresh");
-
- assert.eq(admin.system.sessions.count(), 1, "should have written session records");
-
- // Start some new sessions. Should not be in the collection yet.
- var numSessions = 100;
- for (var i = 0; i < numSessions; i++) {
- res = admin.runCommand(startSession);
- assert.commandWorked(res, "unable to start session");
- }
-
- assert.eq(admin.system.sessions.count(), 1, "should not have more session records yet");
-
- // Trigger another refresh. All sessions should now be in the collection.
- res = admin.runCommand(refresh);
- assert.commandWorked(res, "failed to refresh");
-
- assert.eq(
- admin.system.sessions.count(), numSessions + 1, "should have written session records");
-
-}());