blob: d837c765af40c1fc76cc7afb8190b631ca77a958 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/**
* Test the syntax of $_internalDensify.
* @tags: [
* # Needed as $densify is a 51 feature.
* requires_fcv_51,
* # Our method of connecting via an internal client requries an unsharded topology.
* assumes_unsharded_collection,
* assumes_against_mongod_not_mongos,
* assumes_read_preference_unchanged,
* ]
*/
(function() {
"use strict";
load("jstests/aggregation/sources/densify/libs/parse_util.js");
const dbName = jsTestName();
const testDB = db.getSiblingDB(dbName);
testDB.dropDatabase();
const collName = jsTestName();
const testInternalClient = (function createInternalClient() {
const connInternal = new Mongo(testDB.getMongo().host);
const curDB = connInternal.getDB(dbName);
assert.commandWorked(curDB.runCommand({
["hello"]: 1,
internalClient: {minWireVersion: NumberInt(0), maxWireVersion: NumberInt(7)}
}));
return connInternal;
})();
const internalDB = testInternalClient.getDB(dbName);
const internalColl = internalDB[collName];
parseUtil(internalDB, internalColl, "$_internalDensify", {
writeConcern: {w: "majority"},
});
})();
|