summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough
diff options
context:
space:
mode:
authorMaddie Zechar <mez2113@columbia.edu>2021-06-23 16:49:05 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-06-23 17:20:22 +0000
commit913ced248f4f4a5518dc4079bf17d14fe12f236b (patch)
treebd251a740ba89ae64c21892eb54bfb284fdd712a /jstests/noPassthrough
parentc4849034202d3e75960b99d9383cc43321ad866e (diff)
downloadmongo-913ced248f4f4a5518dc4079bf17d14fe12f236b.tar.gz
Revert "SERVER-57256: Add deprecation message for count command and direct reader to docs"
This reverts commit 30725e9c2316bf28a79d15d681c6df897b93b11b.
Diffstat (limited to 'jstests/noPassthrough')
-rw-r--r--jstests/noPassthrough/deprecated_count.js37
1 files changed, 0 insertions, 37 deletions
diff --git a/jstests/noPassthrough/deprecated_count.js b/jstests/noPassthrough/deprecated_count.js
deleted file mode 100644
index aafee4ca749..00000000000
--- a/jstests/noPassthrough/deprecated_count.js
+++ /dev/null
@@ -1,37 +0,0 @@
-// The count command is deprecated in 5.0.
-//
-// In this test, we run the count command several times.
-// We want to make sure that the deprecation warning message is only logged once despite
-// the multiple invocations in an effort to not clutter the dev's console.
-// More specifically, we expect to only log 1/127 of count() events.
-
-(function() {
-"use strict";
-load("jstests/libs/log.js"); // For findMatchingLogLine, findMatchingLogLines
-
-jsTest.log('Test standalone');
-const standalone = MongoRunner.runMongod({});
-const dbName = 'test';
-const collName = "test_count_command_deprecation_messaging";
-const db = standalone.getDB(dbName);
-const coll = db.getCollection(collName);
-
-coll.drop();
-var res = assert.commandWorked(db.runCommand({count: collName}));
-assert.eq(0, res.n);
-assert.commandWorked(coll.insert({i: 1}));
-res = assert.commandWorked(db.runCommand({count: collName}));
-assert.eq(1, res.n);
-assert.commandWorked(coll.insert({i: 1}));
-res = assert.commandWorked(db.runCommand({count: collName}));
-assert.eq(2, res.n);
-
-const globalLogs = db.adminCommand({getLog: 'global'});
-const fieldMatcher = {
- msg:
- "The count command is deprecated. For more information, see https://docs.mongodb.com/manual/reference/method/db.collection.count/"
-};
-const matchingLogLines = [...findMatchingLogLines(globalLogs.log, fieldMatcher)];
-assert.eq(matchingLogLines.length, 1, matchingLogLines);
-MongoRunner.stopMongod(standalone);
-})();