"compatibility" readMode now causes the shell to detect whether or not to use find/getMore commands based on wire version. "commands" mode forces use of the find/getMore commands, and "legacy" mode forces uses of legacy OP_QUERY/OP_GET_MORE reads. Also configures tests to force use of "commands" or "legacy" mode as appropriate.
10 lines
275 B
JavaScript
10 lines
275 B
JavaScript
(function() {
|
|
"use strict";
|
|
if (!db.getMongo().useReadCommands()) {
|
|
var testDB = db.getSiblingDB("blah");
|
|
// test that we can run the 'inprog' pseudocommand on any database.
|
|
assert.commandWorked(testDB.$cmd.sys.inprog.findOne());
|
|
}
|
|
|
|
})();
|