summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/clustered_collection_hint_nonreplicated.js
blob: 42ab4ddeab25f913fc33e7763830d30c89abf11f (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
/**
 * Tests that a collection with a clustered index can use and interpret a query hint.
 * @tags: [
 *   requires_fcv_52,
 *   # Does not support sharding
 *   assumes_against_mongod_not_mongos,
 *   assumes_unsharded_collection,
 * ]
 */
(function() {
"use strict";
load("jstests/libs/clustered_collections/clustered_collection_util.js");
load("jstests/libs/clustered_collections/clustered_collection_hint_common.js");

const conn = MongoRunner.runMongod({setParameter: {supportArbitraryClusterKeyIndex: true}});

const nonReplicatedDB = conn.getDB("local");
const collName = "coll";
const nonReplicatedColl = nonReplicatedDB[collName];

testClusteredCollectionHint(nonReplicatedColl, {ts: 1}, "ts_1");

MongoRunner.stopMongod(conn);
})();