summaryrefslogtreecommitdiff
path: root/jstests/sharding/cluster_server_parameter_commands_sharded.js
blob: 4b8486befc9ed72e9b323575fc3cd49a43b1e55a (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
/**
 * Checks that set/getClusterParameter runs as expected on sharded clusters.
 *
 * @tags: [
 *   # Requires all nodes to be running the latest binary.
 *   requires_fcv_60,
 *   featureFlagClusterWideConfig,
 *   does_not_support_stepdowns,
 *   requires_replication,
 *   requires_sharding
 *  ]
 */
(function() {
'use strict';

load('jstests/libs/cluster_server_parameter_utils.js');

// Tests that set/getClusterParameter works on all nodes of a sharded cluster.
const options = {
    mongos: 1,
    config: 1,
    shards: 3,
    rs: {
        nodes: 3,
    },
};
const st = new ShardingTest(options);

// Setup the necessary logging on mongos and the shards.
setupSharded(st);

// First, ensure that incorrect usages of set/getClusterParameter fail appropriately on mongos
// and cluster mongods.
testInvalidClusterParameterCommands(st);

// Then, ensure that set/getClusterParameter set and retrieve the expected values on mongos
// and the majority of nodes on all replica sets in the cluster.
testValidClusterParameterCommands(st);

st.stop();
})();