SERVER-72867 eol-terminate all nonempty text files

This commit is contained in:
Billy Donahue 2023-04-26 17:50:58 +00:00 committed by Evergreen Agent
parent 1524074b3f
commit 49395d449c
281 changed files with 281 additions and 281 deletions

View File

@ -189,4 +189,4 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
licensed here. There are no understandings, agreements or representations with respect to the licensed here. There are no understandings, agreements or representations with respect to the
Work not specified here. Licensor shall not be bound by any additional provisions that may Work not specified here. Licensor shall not be bound by any additional provisions that may
appear in any communication from You. This License may not be modified without the mutual appear in any communication from You. This License may not be modified without the mutual
written agreement of the Licensor and You. written agreement of the Licensor and You.

View File

@ -52,4 +52,4 @@ generic_reply_field_lists:
description: "IDL checker provides no guarantees about unstable generic reply fields" description: "IDL checker provides no guarantees about unstable generic reply fields"
fields: fields:
unstableGenericReplyField: unstableGenericReplyField:
forward_from_shards: false forward_from_shards: false

View File

@ -56,4 +56,4 @@ generic_reply_field_lists:
description: "IDL checker provides no guarantees about unstable generic reply fields" description: "IDL checker provides no guarantees about unstable generic reply fields"
fields: fields:
unstableGenericReplyField: unstableGenericReplyField:
forward_from_shards: false forward_from_shards: false

View File

@ -58,4 +58,4 @@ generic_reply_field_lists:
Removing an unstable reply field should still pass" Removing an unstable reply field should still pass"
fields: fields:
unstableGenericReplyField: unstableGenericReplyField:
forward_from_shards: false forward_from_shards: false

View File

@ -59,4 +59,4 @@ generic_reply_field_lists:
unstableGenericReplyField: unstableGenericReplyField:
forward_from_shards: false forward_from_shards: false
removedUnstableGenericReplyField: removedUnstableGenericReplyField:
forward_from_shards: false forward_from_shards: false

View File

@ -1,3 +1,3 @@
3 removed shim node property 3 removed shim node property
2 flipped edge direction in graph file data 2 flipped edge direction in graph file data
1 initial schema 1 initial schema

View File

@ -366,4 +366,4 @@ int main(int argc, char** argv) {
clean_up(); clean_up();
exit(0); exit(0);
} }

View File

@ -46,4 +46,4 @@ then
. "$NVM_DIR/nvm.sh" . "$NVM_DIR/nvm.sh"
fi fi
popd > /dev/null popd > /dev/null

View File

@ -258,4 +258,4 @@ const EdgeList = ({ selectedGraph, links, setLinks, linksTrans, loading, setFind
); );
}; };
export default connect(getEdges, { setGraphData, setFindNode, setLinks, setSelectedPath })(withStyles(styles)(EdgeList)); export default connect(getEdges, { setGraphData, setFindNode, setLinks, setSelectedPath })(withStyles(styles)(EdgeList));

View File

@ -174,4 +174,4 @@ const NodeList = ({ selectedGraph, nodes, searchedNodes, loading, setFindNode, s
); );
}; };
export default connect(getNodes, { setFindNode, setNodes, setNodeInfos, setLinks, setLinksTrans, setLoading, setListSearchTerm, updateCheckbox, updateSelected, setGraphData })(NodeList); export default connect(getNodes, { setFindNode, setNodes, setNodeInfos, setLinks, setLinksTrans, setLoading, setListSearchTerm, updateCheckbox, updateSelected, setGraphData })(NodeList);

View File

@ -13,4 +13,4 @@ export const listSearchTerm = (state = initialState, action) => {
export const setListSearchTerm = (listSearchTerm) => ({ export const setListSearchTerm = (listSearchTerm) => ({
type: "setListSearchTerm", type: "setListSearchTerm",
payload: listSearchTerm, payload: listSearchTerm,
}); });

View File

@ -13,4 +13,4 @@ module.exports = function(app) {
secure: false, secure: false,
}) })
); );
}; };

View File

@ -113,4 +113,4 @@ Original SSLeay License
* derivative of this code cannot be changed. i.e. this code cannot simply be * derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence * copied and put under another distribution licence
* [including the GNU Public Licence.] * [including the GNU Public Licence.]
*/ */

View File

@ -2441,4 +2441,4 @@ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
END END

View File

@ -82,4 +82,4 @@ For details on transport internals, including ingress networking, see [this docu
[transaction_router_h]: ../src/mongo/s/transaction_router.h [transaction_router_h]: ../src/mongo/s/transaction_router.h
[commands_h]: ../src/mongo/db/commands.h [commands_h]: ../src/mongo/db/commands.h
[template_method_pattern]: https://en.wikipedia.org/wiki/Template_method_pattern [template_method_pattern]: https://en.wikipedia.org/wiki/Template_method_pattern
[transport_internals]: ../src/mongo/transport/README.md [transport_internals]: ../src/mongo/transport/README.md

View File

@ -38,4 +38,4 @@ document][transport_internals].
[network_interface_h]: ../src/mongo/executor/network_interface.h [network_interface_h]: ../src/mongo/executor/network_interface.h
[dbclient_rs_h]: ../src/mongo/client/dbclient_rs.h [dbclient_rs_h]: ../src/mongo/client/dbclient_rs.h
[automatic_failover]: https://docs.mongodb.com/manual/replication/#automatic-failover [automatic_failover]: https://docs.mongodb.com/manual/replication/#automatic-failover
[transport_internals]: ../src/mongo/transport/README.md [transport_internals]: ../src/mongo/transport/README.md

View File

@ -103,4 +103,4 @@ responsible for deleting its state document, such logic needs to be careful as t
document is deleted, the corresponding PrimaryOnlyService is no longer keeping that Instance alive. document is deleted, the corresponding PrimaryOnlyService is no longer keeping that Instance alive.
If an Instance has any additional logic or internal state to update after deleting its state If an Instance has any additional logic or internal state to update after deleting its state
document, it must extend its own lifetime by capturing a shared_ptr to itself by calling document, it must extend its own lifetime by capturing a shared_ptr to itself by calling
shared_from_this() before deleting its state document. shared_from_this() before deleting its state document.

View File

@ -533,4 +533,4 @@ and OwnColl assertions.
fewer than 20% of the threads fail while spawning we allow the non-failed fewer than 20% of the threads fail while spawning we allow the non-failed
threads to continue with the test. The 20% threshold is somewhat arbitrary; threads to continue with the test. The 20% threshold is somewhat arbitrary;
the goal is to abort if "mostly all" of the threads failed but to tolerate "a the goal is to abort if "mostly all" of the threads failed but to tolerate "a
few" threads failing. few" threads failing.

View File

@ -2,4 +2,4 @@ psutil
jsonschema jsonschema
memory_profiler memory_profiler
puremagic puremagic
tabulate tabulate

View File

@ -269,4 +269,4 @@ assert.commandFailedWithCode(
"aggregate", "aggregate",
{pipeline: [{$group: {_id: {'st': '$state'}, sales: {$firstN: {n: 2}}}}], cursor: {}}), {pipeline: [{$group: {_id: {'st': '$state'}, sales: {$firstN: {n: 2}}}}], cursor: {}}),
5787907); 5787907);
})(); })();

View File

@ -9,4 +9,4 @@ assert.commandWorked(c.insert({_id: 0, a: 1}));
assert.eq( assert.eq(
[], [],
c.aggregate([{$project: {"b": 1}}, {$match: {$expr: {$getField: {$literal: "a"}}}}]).toArray()); c.aggregate([{$project: {"b": 1}}, {$match: {$expr: {$getField: {$literal: "a"}}}}]).toArray());
})(); })();

View File

@ -27,4 +27,4 @@ assert(resultsEq(
]) ])
.toArray(), .toArray(),
)); ));
})(); })();

View File

@ -20,4 +20,4 @@ let res = db.runCommand({
assert.commandWorked(res); assert.commandWorked(res);
assert.eq(res.cursor.firstBatch, [{foo: 1}]); assert.eq(res.cursor.firstBatch, [{foo: 1}]);
}()); }());

View File

@ -56,4 +56,4 @@ testExpr({$minN: args}, [3, 4]);
testExpr({$maxN: args}, [5, 4]); testExpr({$maxN: args}, [5, 4]);
testExpr({$firstN: args}, [3, 4]); testExpr({$firstN: args}, [3, 4]);
testExpr({$lastN: args}, [4, 5]); testExpr({$lastN: args}, [4, 5]);
})(); })();

View File

@ -315,4 +315,4 @@ assertErrorCode(coll, [{$project: {a: {$exp: "$x"}}}], 28765);
assertErrorCode(coll, [{$project: {a: {$log10: "$x"}}}], 28765); assertErrorCode(coll, [{$project: {a: {$log10: "$x"}}}], 28765);
assertErrorCode(coll, [{$project: {a: {$ln: "$x"}}}], 28765); assertErrorCode(coll, [{$project: {a: {$ln: "$x"}}}], 28765);
assertErrorCode(coll, [{$project: {a: {$sqrt: "$x"}}}], 28765); assertErrorCode(coll, [{$project: {a: {$sqrt: "$x"}}}], 28765);
}()); }());

View File

@ -86,4 +86,4 @@ function assertMergeSucceedsWithExpectedUniqueIndex(
// recreation in the sharded collections passthrough suites. // recreation in the sharded collections passthrough suites.
function dropWithoutImplicitRecreate(collName) { function dropWithoutImplicitRecreate(collName) {
db.runCommand({drop: collName}); db.runCommand({drop: collName});
} }

View File

@ -50,4 +50,4 @@ if (!FixtureHelpers.isMongos(db)) {
// $out allows for the source collection to be the same as the destination collection. // $out allows for the source collection to be the same as the destination collection.
assertErrorCode(outputToLocal, {$out: outputToLocal.getName()}, 31321); assertErrorCode(outputToLocal, {$out: outputToLocal.getName()}, 31321);
} }
})(); })();

View File

@ -34,4 +34,4 @@ for (let preventProjectPushdown of [false, true]) {
assert(arrayEq(results, [{a: 2}]), assert(arrayEq(results, [{a: 2}]),
"Pipeline:\n" + tojson(pipeline) + "Actual results:\n" + tojson(results)); "Pipeline:\n" + tojson(pipeline) + "Actual results:\n" + tojson(results));
} }
}()); }());

View File

@ -110,4 +110,4 @@ let finishedOutput = coll.aggregate([{$indexStats: {}}, {$match: {name: indexNam
for (const indexStats of finishedOutput) { for (const indexStats of finishedOutput) {
assert(!indexStats.hasOwnProperty("building"), tojson(indexStats)); assert(!indexStats.hasOwnProperty("building"), tojson(indexStats));
} }
})(); })();

View File

@ -35,4 +35,4 @@ for (let preventProjectPushdown of [false, true]) {
assert(arrayEq(results, [{foo: 3}]), assert(arrayEq(results, [{foo: 3}]),
"Pipeline:\n" + tojson(pipeline) + "Actual results:\n" + tojson(results)); "Pipeline:\n" + tojson(pipeline) + "Actual results:\n" + tojson(results));
} }
}()); }());

View File

@ -30,4 +30,4 @@ assert.doesNotThrow(() => coll.aggregate(pipeline));
assertArrayEq( assertArrayEq(
{actual: coll.find().toArray(), expected: [{_id: 0, a: 3}, {_id: 1, a: 1}, {_id: 2, a: 2}]}); {actual: coll.find().toArray(), expected: [{_id: 0, a: 3}, {_id: 1, a: 1}, {_id: 2, a: 2}]});
}()); }());

View File

@ -124,4 +124,4 @@ verifyResults(result, function(num, baseObj) {
} }
return baseObj; return baseObj;
}); });
})(); })();

View File

@ -88,4 +88,4 @@ assert(resultsEq(res.toArray(), [
{int_field: 0, count: 1}, {int_field: 0, count: 1},
{other_field: 0, count: 1} {other_field: 0, count: 1}
])); ]));
})(); })();

View File

@ -110,4 +110,4 @@ verifyResults(result, function(num, baseObj) {
}); });
result = runRankBasedAccumulator({double: 1}, {$documentNumber: {}}); result = runRankBasedAccumulator({double: 1}, {$documentNumber: {}});
verifyResults(result, noTieFunc); verifyResults(result, noTieFunc);
})(); })();

View File

@ -334,4 +334,4 @@ assert.commandFailedWithCode(coll.runCommand({
cursor: {} cursor: {}
}), }),
ErrorCodes.FailedToParse); ErrorCodes.FailedToParse);
})(); })();

View File

@ -66,4 +66,4 @@ assert.commandWorked(
collScanStage.filter, collScanStage.filter,
collScanStage); collScanStage);
} }
}()); }());

View File

@ -199,4 +199,4 @@ assertActionAuthorized(removePreImage.bind(null, rootPrimary), true);
rootPrimary.logout(); rootPrimary.logout();
replSetTest.stopSet(); replSetTest.stopSet();
})(); })();

View File

@ -9,4 +9,4 @@ load("jstests/auth/listcommands_preauth_base.js");
const mongod = MongoRunner.runMongod({auth: ""}); const mongod = MongoRunner.runMongod({auth: ""});
runTest(mongod); runTest(mongod);
MongoRunner.stopMongod(mongod); MongoRunner.stopMongod(mongod);
})(); })();

View File

@ -11,4 +11,4 @@ const st =
new ShardingTest({shards: 1, mongos: 1, config: 1, other: {keyFile: 'jstests/libs/key1'}}); new ShardingTest({shards: 1, mongos: 1, config: 1, other: {keyFile: 'jstests/libs/key1'}});
runTest(st.s0); runTest(st.s0);
st.stop(); st.stop();
})(); })();

View File

@ -19,4 +19,4 @@ var indexList = testDB.foo.getIndexes().filter(function(idx) {
}); });
assert.eq(1, indexList.length, tojson(indexList)); assert.eq(1, indexList.length, tojson(indexList));
assert.docEq(indexList[0].key, {a: 1}, tojson(indexList)); assert.docEq(indexList[0].key, {a: 1}, tojson(indexList));
MongoRunner.stopMongod(conn, null, {user: 'root', pwd: 'password'}); MongoRunner.stopMongod(conn, null, {user: 'root', pwd: 'password'});

View File

@ -14,4 +14,4 @@ const mongoOutput = rawMongoProgramOutput();
assert(mongoOutput.indexOf( assert(mongoOutput.indexOf(
"security.keyFile is required when authorization is enabled with replica sets") >= 0, "security.keyFile is required when authorization is enabled with replica sets") >= 0,
"Expected error message about missing keyFile on startup"); "Expected error message about missing keyFile on startup");
})(); })();

View File

@ -58,4 +58,4 @@ function runTest(conn) {
const standalone = MongoRunner.runMongod({auth: ''}); const standalone = MongoRunner.runMongod({auth: ''});
runTest(standalone); runTest(standalone);
MongoRunner.stopMongod(standalone); MongoRunner.stopMongod(standalone);
})(); })();

View File

@ -150,4 +150,4 @@ function runTest(conn, mode) {
jsTest.log('SUCCESS user_cache_acquisition_stats.js Sharding'); jsTest.log('SUCCESS user_cache_acquisition_stats.js Sharding');
st.stop(); st.stop();
} }
})(); })();

View File

@ -30,4 +30,4 @@ const err = assert.throws(function() {
assert.commandFailedWithCode(err, ErrorCodes.ChangeStreamFatalError); assert.commandFailedWithCode(err, ErrorCodes.ChangeStreamFatalError);
assert("errorLabels" in err, err); assert("errorLabels" in err, err);
assert.contains("NonResumableChangeStreamError", err.errorLabels, err); assert.contains("NonResumableChangeStreamError", err.errorLabels, err);
}()); }());

View File

@ -35,4 +35,4 @@ delete v2Event._id;
assert.docEq(v1Event, v2Event); assert.docEq(v1Event, v2Event);
assert.neq(v1ResumeToken, v2ResumeToken, {v1ResumeToken, v2ResumeToken}); assert.neq(v1ResumeToken, v2ResumeToken, {v1ResumeToken, v2ResumeToken});
})(); })();

View File

@ -145,4 +145,4 @@ if (!FixtureHelpers.isMongos(testDB)) {
{_id: 6, operationType: "delete", preImage: {_id: 6, a: 1}}, {_id: 6, operationType: "delete", preImage: {_id: 6, a: 1}},
]); ]);
} }
})(); })();

View File

@ -84,4 +84,4 @@ for (let fieldName of fieldsToInclude) {
// Test projection of all accumulated fields. // Test projection of all accumulated fields.
assertProjection(Object.assign(accumulatedProjection, currentFieldProjection)); assertProjection(Object.assign(accumulatedProjection, currentFieldProjection));
} }
})(); })();

View File

@ -72,4 +72,4 @@ expected = {
testPipelineStyleUpdate(updatePipeline, expected, "update"); testPipelineStyleUpdate(updatePipeline, expected, "update");
cst.cleanUp(); cst.cleanUp();
}()); }());

View File

@ -263,4 +263,4 @@ assert.soon(() => {
return csCursor.hasNext() && csCursor.next().operationType === "invalidate"; return csCursor.hasNext() && csCursor.next().operationType === "invalidate";
}); });
csCursor.close(); csCursor.close();
})(); })();

View File

@ -71,4 +71,4 @@ const clientSideFLEOptionsBypassAutoEncrypt = {
test(conn, clientSideFLEOptionsBypassAutoEncrypt, keyId); test(conn, clientSideFLEOptionsBypassAutoEncrypt, keyId);
MongoRunner.stopMongod(conn); MongoRunner.stopMongod(conn);
}()); }());

View File

@ -82,4 +82,4 @@ testFaults((keyId, shell) => {
}); });
MongoRunner.stopMongod(conn); MongoRunner.stopMongod(conn);
}()); }());

View File

@ -75,4 +75,4 @@ keyVault.createKey("local", ['mongoKey3']);
assert.eq(3, keyVault.getKeys().itcount()); assert.eq(3, keyVault.getKeys().itcount());
MongoRunner.stopMongod(conn); MongoRunner.stopMongod(conn);
}()); }());

View File

@ -36,4 +36,4 @@ assert.commandFailedWithCode(testDB.runCommand({
apiStrict: true, apiStrict: true,
}), }),
ErrorCodes.InvalidOptions); ErrorCodes.InvalidOptions);
})(); })();

View File

@ -40,4 +40,4 @@ assert.neq(ixScanStage, null, plan);
const results = buildQuery().toArray(); const results = buildQuery().toArray();
assert.eq(results, [{y: 0, x: 1}, {y: 0, x: 0}], results); assert.eq(results, [{y: 0, x: 1}, {y: 0, x: 0}], results);
}()); }());

View File

@ -104,4 +104,4 @@ const testCommand = function(cmd, cmdObj) {
testCommand("createIndexes", {createIndexes: "", indexes: [{name: "x_1", key: {x: 1}}]}); testCommand("createIndexes", {createIndexes: "", indexes: [{name: "x_1", key: {x: 1}}]});
testCommand("dropIndexes", {dropIndexes: "", index: {y: 1}}); testCommand("dropIndexes", {dropIndexes: "", index: {y: 1}});
})(); })();

View File

@ -26,4 +26,4 @@ assert.throws(() => coll.createIndex(
/* commitQuorum */ "majority", /* commitQuorum */ "majority",
{background: true}, {background: true},
{unique: true})); {unique: true}));
}()); }());

View File

@ -121,4 +121,4 @@ err = t.insert({
}); });
assert.includes(err.getWriteError().errmsg, assert.includes(err.getWriteError().errmsg,
"Element 1 of \"geometries\" must be an object, instead got type double:"); "Element 1 of \"geometries\" must be an object, instead got type double:");
})(); })();

View File

@ -133,4 +133,4 @@ validateCountCmdOutputAndPlan({
expectedOutput: 1, expectedOutput: 1,
expectedStages: ["IXSCAN", "FETCH"] expectedStages: ["IXSCAN", "FETCH"]
}); });
})(); })();

View File

@ -73,4 +73,4 @@ assert.commandFailedWithCode(coll.insert({a: [1], b: 6}), 16766);
// Array insertion allowed when the document doesn't match the partial filter predication. // Array insertion allowed when the document doesn't match the partial filter predication.
assert.commandWorked(coll.insert({a: [1], b: 1})); assert.commandWorked(coll.insert({a: [1], b: 1}));
})(); })();

View File

@ -10,4 +10,4 @@ doit = function() {
}; };
doit(); doit();
f.createIndex({list: 1}); f.createIndex({list: 1});
doit(); doit();

View File

@ -24,4 +24,4 @@ t.drop();
test(t); test(t);
t.drop(); t.drop();
t.createIndex({a: 1}); t.createIndex({a: 1});
test(t); test(t);

View File

@ -9,4 +9,4 @@ assert(db.factories.find().count());
assert.eq(1, db.factories.find({metro: {city: "New York", state: "NY"}}).hint({metro: 1}).count()); assert.eq(1, db.factories.find({metro: {city: "New York", state: "NY"}}).hint({metro: 1}).count());
assert.eq(1, db.factories.find({metro: {$gte: {city: "New York"}}}).hint({metro: 1}).count()); assert.eq(1, db.factories.find({metro: {$gte: {city: "New York"}}}).hint({metro: 1}).count());

View File

@ -79,4 +79,4 @@ x = {
assert.eq( assert.eq(
JSON.stringify(x), JSON.stringify(x),
'{"data_binary":{"$binary":"VG8gYmUgb3Igbm90IHRvIGJlLi4uIFRoYXQgaXMgdGhlIHF1ZXN0aW9uLg==","$type":"00"},"data_timestamp":{"$timestamp":{"t":987654321,"i":0}},"data_regex":{"$regex":"^acme","$options":"i"},"data_oid":{"$oid":"579a70d9e249393f153b5bc1"},"data_ref":{"$ref":"test","$id":"579a70d9e249393f153b5bc1"},"data_minkey":{"$minKey":1},"data_maxkey":{"$maxKey":1},"data_numberlong":{"$numberLong":"12345"},"data_numberint":5,"data_numberdecimal":{"$numberDecimal":"3.14000000000000"}}'); '{"data_binary":{"$binary":"VG8gYmUgb3Igbm90IHRvIGJlLi4uIFRoYXQgaXMgdGhlIHF1ZXN0aW9uLg==","$type":"00"},"data_timestamp":{"$timestamp":{"t":987654321,"i":0}},"data_regex":{"$regex":"^acme","$options":"i"},"data_oid":{"$oid":"579a70d9e249393f153b5bc1"},"data_ref":{"$ref":"test","$id":"579a70d9e249393f153b5bc1"},"data_minkey":{"$minKey":1},"data_maxkey":{"$maxKey":1},"data_numberlong":{"$numberLong":"12345"},"data_numberint":5,"data_numberdecimal":{"$numberDecimal":"3.14000000000000"}}');

View File

@ -42,4 +42,4 @@ for (let divisor of [-1.0, NumberInt("-1"), NumberLong("-1"), NumberDecimal("-1"
.aggregate([{$project: {val: 1, modVal: {$mod: ["$val", divisor]}}}, {$sort: {_id: 1}}]) .aggregate([{$project: {val: 1, modVal: {$mod: ["$val", divisor]}}}, {$sort: {_id: 1}}])
.toArray()); .toArray());
} }
})(); })();

View File

@ -20,4 +20,4 @@ assert.throws(function() {
assert.throws(function() { assert.throws(function() {
coll.find({a: {$_internalSchemaObjectMatch: {$expr: {$eq: ["$foo", "$bar"]}}}}).itcount(); coll.find({a: {$_internalSchemaObjectMatch: {$expr: {$eq: ["$foo", "$bar"]}}}}).itcount();
}); });
}()); }());

View File

@ -20,4 +20,4 @@ assert.throws(function() {
// NOTE Above we don't check cases like {b:2,$elemMatch:{b:3,4}} - generally // NOTE Above we don't check cases like {b:2,$elemMatch:{b:3,4}} - generally
// we assume that the first key is $elemMatch if any key is, and validating // we assume that the first key is $elemMatch if any key is, and validating
// every key is expensive in some cases. // every key is expensive in some cases.

View File

@ -170,4 +170,4 @@ function assertExplainIxscan(explainPlan, expectedIndexSpec, expectedKeysExamine
// We couldn't create a tight bound for the index scan as the index is not hashed. // We couldn't create a tight bound for the index scan as the index is not hashed.
assertExplainIxscan(explainPlan, indexSpec, 3 /* keyExamined */); assertExplainIxscan(explainPlan, indexSpec, 3 /* keyExamined */);
})(); })();
})(); })();

View File

@ -37,4 +37,4 @@ function testDBQuery() {
testDBCollection(); testDBCollection();
testDB(); testDB();
testDBQuery(); testDBQuery();
})(); })();

View File

@ -5,4 +5,4 @@ assert.throws(function() {
assert.throws(function() { assert.throws(function() {
Object.bsonsize({"\0asdf": 1}); Object.bsonsize({"\0asdf": 1});
}, [], "null char in field name"); }, [], "null char in field name");

View File

@ -15,4 +15,4 @@ t.createIndex({a: 1, b: -1});
assert.eq.automsg("1", "t.count( {$or: [ { a: { $gt:0,$lt:2 } }, { a: { $gt:-1,$lt:3 } } ] } )"); assert.eq.automsg("1", "t.count( {$or: [ { a: { $gt:0,$lt:2 } }, { a: { $gt:-1,$lt:3 } } ] } )");
assert.eq.automsg( assert.eq.automsg(
"1", "t.count( {$or: [ { a:1, b: { $gt:0,$lt:2 } }, { a:1, b: { $gt:-1,$lt:3 } } ] } )"); "1", "t.count( {$or: [ { a:1, b: { $gt:0,$lt:2 } }, { a:1, b: { $gt:-1,$lt:3 } } ] } )");

View File

@ -23,4 +23,4 @@ assert.eq(/^b/, t.findOne({r: /^b/}).r, '3 1 b');
assert.eq(1, t.count({r: /^b/}), '3 2 b'); assert.eq(1, t.count({r: /^b/}), '3 2 b');
t.insert({r: "a"}); t.insert({r: "a"});
assert.eq(2, t.count({r: /^a/}), 'c'); assert.eq(2, t.count({r: /^a/}), 'c');

View File

@ -21,4 +21,4 @@ for (i = 0; i < 5; ++i) {
} }
assert.eq(5, t.find({a: 1}).sort({b: 1}).itcount()); assert.eq(5, t.find({a: 1}).sort({b: 1}).itcount());
t.drop(); t.drop();

View File

@ -16,4 +16,4 @@ function test() {
test(); test();
t.createIndex({a: 1}); t.createIndex({a: 1});
test(); test();

View File

@ -27,4 +27,4 @@ for (const type of bsonTypes) {
results = coll.find({a: {$not: {$type: type}}}).sort({_id: 1}).toArray(); results = coll.find({a: {$not: {$type: type}}}).sort({_id: 1}).toArray();
assert.eq(results, documentList); assert.eq(results, documentList);
} }
}()); }());

View File

@ -16,4 +16,4 @@ assert.eq(3, doc['mys'][2]);
assert.eq(undefined, doc['mys'][3]); assert.eq(undefined, doc['mys'][3]);
assert.eq(undefined, doc['mys'][4]); assert.eq(undefined, doc['mys'][4]);
assert.eq(6, doc['mys'][5]); assert.eq(6, doc['mys'][5]);
}()); }());

View File

@ -32,4 +32,4 @@ assert.throws(() => coll.save("The answer to life, the universe and everything")
assert.throws(() => coll.save([{"fruit": "mango"}, {"fruit": "orange"}]), assert.throws(() => coll.save([{"fruit": "mango"}, {"fruit": "orange"}]),
[], [],
"saving an array must throw an error"); "saving an array must throw an error");
})(); })();

View File

@ -22,4 +22,4 @@ function randomLongLat() {
const lat = latRadians * 180 / Math.PI; const lat = latRadians * 180 / Math.PI;
return [long, lat]; return [long, lat];
} }
} }

View File

@ -32,4 +32,4 @@ for (let i = 0; i < 100; i++) {
tags: host.tags, tags: host.tags,
})); }));
} }
})(); })();

View File

@ -112,4 +112,4 @@ assert.docEq(doc1, testColl.findOne(doc1));
assert.docEq(doc1, sessionColl.findOne(doc1)); assert.docEq(doc1, sessionColl.findOne(doc1));
assert.docEq(doc2, testColl.findOne(doc2)); assert.docEq(doc2, testColl.findOne(doc2));
assert.docEq(doc2, sessionColl.findOne(doc2)); assert.docEq(doc2, sessionColl.findOne(doc2));
}()); }());

View File

@ -113,4 +113,4 @@ assert.commandFailedWithCode(
assert.commandWorked(session.commitTransaction_forTesting()); assert.commandWorked(session.commitTransaction_forTesting());
session.endSession(); session.endSession();
}()); }());

View File

@ -30,4 +30,4 @@ assert.eq(0, f.findOne()._id, "D");
f.drop(); f.drop();
f.save({_id: 1, a: 1}); f.save({_id: 1, a: 1});
f.update({}, {$unset: {"a": 1, "b.c": 1}}); f.update({}, {$unset: {"a": 1, "b.c": 1}});
assert.docEq({_id: 1}, f.findOne(), "E"); assert.docEq({_id: 1}, f.findOne(), "E");

View File

@ -17,4 +17,4 @@ function doTest() {
doTest(); doTest();
t.drop(); t.drop();
t.createIndex({'a.id': 1}); t.createIndex({'a.id': 1});
doTest(); doTest();

View File

@ -33,4 +33,4 @@ assert.commandFailedWithCode(coll.runCommand("delete", {
deletes: [{q: {_id: 0}, limit: 1, hint: {[longHint]: 1}}], deletes: [{q: {_id: 0}, limit: 1, hint: {[longHint]: 1}}],
}), }),
ErrorCodes.BadValue); ErrorCodes.BadValue);
}()); }());

View File

@ -32,4 +32,4 @@ res = t.explain("executionStats")
.aggregate([{$project: {'_id': 0, 'a': 1}}, {$match: {'a': {$gt: 60, $lt: 100}}}]); .aggregate([{$project: {'_id': 0, 'a': 1}}, {$match: {'a': {$gt: 60, $lt: 100}}}]);
assert.eq(2, res.executionStats.nReturned); assert.eq(2, res.executionStats.nReturned);
assertValueOnPlanPath("IndexScan", res, "child.child.nodeType"); assertValueOnPlanPath("IndexScan", res, "child.child.nodeType");
}()); }());

View File

@ -12,4 +12,4 @@ t.drop();
const res = t.explain("executionStats").aggregate([{$match: {'a': 2}}]); const res = t.explain("executionStats").aggregate([{$match: {'a': 2}}]);
assert.eq(0, res.executionStats.nReturned); assert.eq(0, res.executionStats.nReturned);
}()); }());

View File

@ -27,4 +27,4 @@ const res = t.explain("executionStats").aggregate([{$match: {a: {$gte: 0}}}]);
assert.eq(nDocs, res.executionStats.nReturned); assert.eq(nDocs, res.executionStats.nReturned);
assertValueOnPlanPath("PhysicalScan", res, "child.child.nodeType"); assertValueOnPlanPath("PhysicalScan", res, "child.child.nodeType");
}()); }());

View File

@ -30,4 +30,4 @@ assert.eq(1, res.length);
// TODO: verify with explain the plan should not use the index. // TODO: verify with explain the plan should not use the index.
res = t.aggregate([{$match: {'a': 3, 'b': 3}}]).toArray(); res = t.aggregate([{$match: {'a': 3, 'b': 3}}]).toArray();
assert.eq(2, res.length); assert.eq(2, res.length);
}()); }());

View File

@ -31,4 +31,4 @@ assert.eq(1, res.executionStats.nReturned);
const indexNode = navigateToPlanPath(res, "child.leftChild"); const indexNode = navigateToPlanPath(res, "child.leftChild");
assertValueOnPath("IndexScan", indexNode, "nodeType"); assertValueOnPath("IndexScan", indexNode, "nodeType");
assertValueOnPath("b_1", indexNode, "indexDefName"); assertValueOnPath("b_1", indexNode, "indexDefName");
}()); }());

View File

@ -19,4 +19,4 @@ assert.commandWorked(t.insert({_id: 6, x: 4}));
const res = t.aggregate([{$unwind: '$x'}, {$sort: {'x': 1}}]).toArray(); const res = t.aggregate([{$unwind: '$x'}, {$sort: {'x': 1}}]).toArray();
assert.eq(4, res.length); assert.eq(4, res.length);
}()); }());

View File

@ -34,4 +34,4 @@ t.createIndex(index);
const resIndexScan = t.find(query).hint(index).sort({_id: 1}).toArray(); const resIndexScan = t.find(query).hint(index).sort({_id: 1}).toArray();
assert.eq(resCollScan, resIndexScan); assert.eq(resCollScan, resIndexScan);
} }
}()); }());

View File

@ -22,4 +22,4 @@ t.createIndex({a: 1});
const resIndexScan = t.find({a: {$gte: 1}}).sort({a: -1}).hint({a: 1}).toArray(); const resIndexScan = t.find({a: {$gte: 1}}).sort({a: -1}).hint({a: 1}).toArray();
assert.eq(resCollScan, resIndexScan); assert.eq(resCollScan, resIndexScan);
} }
}()); }());

View File

@ -23,4 +23,4 @@ t.createIndex({a: 1, b: -1});
const resIndexScan = t.find({a: {$gte: 2}}).sort({a: 1, b: -1}).hint({a: 1, b: -1}).toArray(); const resIndexScan = t.find({a: {$gte: 2}}).sort({a: 1, b: -1}).hint({a: 1, b: -1}).toArray();
assert.eq(resCollScan, resIndexScan); assert.eq(resCollScan, resIndexScan);
} }
}()); }());

View File

@ -50,4 +50,4 @@ assert.commandWorked(t.createIndex({b: 1}));
prev = current; prev = current;
} }
} }
}()); }());

View File

@ -75,4 +75,4 @@ IndexScan [{'<rid>': rid_1}, scanDefName: cqf_sorted_merge_, indexDefName: a_1,
`; `;
assert.eq(removeUUIDsFromExplain(db, getExplain()), multikeyExplain); assert.eq(removeUUIDsFromExplain(db, getExplain()), multikeyExplain);
testCorrectness(); testCorrectness();
}()); }());

View File

@ -55,4 +55,4 @@ assert.commandWorked(t.createIndex({a: 1}));
assert.eq(4, res.executionStats.nReturned); assert.eq(4, res.executionStats.nReturned);
assertValueOnPlanPath("IndexScan", res, "child.leftChild.nodeType"); assertValueOnPlanPath("IndexScan", res, "child.leftChild.nodeType");
} }
}()); }());

View File

@ -23,4 +23,4 @@ for (let i = 0; i < 10; i++) {
const res = t.explain("executionStats").aggregate([{$match: {a: {$type: "double"}}}]); const res = t.explain("executionStats").aggregate([{$match: {a: {$type: "double"}}}]);
assert.eq(10, res.executionStats.nReturned); assert.eq(10, res.executionStats.nReturned);
} }
}()); }());

View File

@ -160,4 +160,4 @@ testData.forEach(function(testCase) {
assert.eq(output, `NumberDecimal("${testCase.input}")`); assert.eq(output, `NumberDecimal("${testCase.input}")`);
} }
}); });
}()); }());

View File

@ -301,4 +301,4 @@ data.forEach(function(testCase) {
assert.eq(output, `NumberDecimal("${testCase.input}")`); assert.eq(output, `NumberDecimal("${testCase.input}")`);
} }
}); });
}()); }());

View File

@ -578,4 +578,4 @@ data.forEach(function(testCase) {
assert.eq(output, `NumberDecimal("${testCase.input}")`); assert.eq(output, `NumberDecimal("${testCase.input}")`);
} }
}); });
}()); }());

View File

@ -136,4 +136,4 @@ parseErrors.forEach(function(testCase) {
} }
assert.throws(test, [], `[Test - ${testCase.description}] should have failed with error.`); assert.throws(test, [], `[Test - ${testCase.description}] should have failed with error.`);
}); });
}()); }());

Some files were not shown because too many files have changed in this diff Show More