blob: b749dd4abe5d1df53b5911c75c0b3e6ffa233697 (
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
40
41
42
|
/**
* Checks that set/getClusterParameter runs as expected on serverless replica set nodes.
*
* @tags: [
* does_not_support_stepdowns,
* requires_replication,
* requires_fcv_62,
* serverless
* ]
*/
(function() {
'use strict';
load('jstests/libs/cluster_server_parameter_utils.js');
// Tests that set/getClusterParameter works on a non-sharded replica set.
const rst = new ReplSetTest({
nodes: 3,
});
rst.startSet({
setParameter: {
multitenancySupport: true,
featureFlagRequireTenantID: true,
featureFlagServerlessChangeStreams: true
}
});
rst.initiate();
// Setup the necessary logging level for the test.
setupReplicaSet(rst);
// First, ensure that incorrect usages of set/getClusterParameter fail appropriately.
for (const tenantId of [undefined, ObjectId()]) {
testInvalidClusterParameterCommands(rst, tenantId);
}
// Then, ensure that set/getClusterParameter set and retrieve the expected values on the
// majority of the nodes in the replica set.
testValidServerlessClusterParameterCommands(rst);
rst.stopSet();
})();
|