summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/clustered_collection_nonreplicated_basic.js
blob: 46682ecbc8f1f5025efdeae3ff8c7bd183381d2c (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
/**
 * Tests inserting various cluster key values, duplicates, updates and secondary index lookups
 * on a non-replicated collection clustered by {ts: 1}.
 *
 * @tags: [
 *   assumes_against_mongod_not_mongos,
 *   assumes_no_implicit_collection_creation_after_drop,
 *   assumes_read_concern_unchanged,
 *   assumes_read_preference_unchanged,
 *   assumes_unsharded_collection,
 *   does_not_support_causal_consistency,
 *   does_not_support_stepdowns,
 *   requires_fcv_53,
 *   requires_non_retryable_commands,
 *   requires_non_retryable_writes,
 *   tenant_migration_incompatible, #TODO: why is it incompatible?
 * ]
 */

(function() {
"use strict";

load("jstests/libs/clustered_collections/clustered_collection_util.js");

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

const nonReplicatedDB = conn.getDB('local');
const collName = 'clustered_collection';
const nonReplicatedColl = nonReplicatedDB[collName];

nonReplicatedColl.drop();

ClusteredCollectionUtil.testBasicClusteredCollection(nonReplicatedDB, collName, 'ts');

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