summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Shuvalov <andrew.shuvalov@mongodb.com>2021-12-25 21:40:04 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-12-28 21:25:36 +0000
commitd3b2c6b751133636f8b7622c6fa3ed805be8facd (patch)
tree96f57d258cb80426e6ec6ddd2ba67406884134a5
parentff84ddfd76780fe80b871f423b4bd5b3ed9505d9 (diff)
downloadmongo-d3b2c6b751133636f8b7622c6fa3ed805be8facd.tar.gz
SERVER-62273 fix health monitor integration tests
-rw-r--r--jstests/sharding/health_monitor/server_status_health.js3
-rw-r--r--jstests/sharding/health_monitor/set_parameter_health_monitor_intensity.js5
2 files changed, 7 insertions, 1 deletions
diff --git a/jstests/sharding/health_monitor/server_status_health.js b/jstests/sharding/health_monitor/server_status_health.js
index 5b973ebda82..a0d24c704fd 100644
--- a/jstests/sharding/health_monitor/server_status_health.js
+++ b/jstests/sharding/health_monitor/server_status_health.js
@@ -6,10 +6,13 @@
var st = new ShardingTest({
mongos: 1,
shards: 1,
+ other: {mongosOptions: {setParameter: {featureFlagHealthMonitoring: true}}}
});
const result = assert.commandWorked(st.s0.adminCommand({serverStatus: 1})).health;
print(tojson(result));
assert(result.state == "StartupCheck" || result.state == "Ok");
+
+st.stop();
})();
diff --git a/jstests/sharding/health_monitor/set_parameter_health_monitor_intensity.js b/jstests/sharding/health_monitor/set_parameter_health_monitor_intensity.js
index 1be31334729..236dcaeb31d 100644
--- a/jstests/sharding/health_monitor/set_parameter_health_monitor_intensity.js
+++ b/jstests/sharding/health_monitor/set_parameter_health_monitor_intensity.js
@@ -7,6 +7,7 @@ var st = new ShardingTest({
mongos: [{
setParameter: {
healthMonitoring: tojson({dns: "off", ldap: "critical"}),
+ featureFlagHealthMonitoring: true
}
}],
shards: 1,
@@ -22,8 +23,10 @@ assert.commandFailed(st.s0.adminCommand({"setParameter": 1, healthMonitoring: {i
assert.commandWorked(
st.s0.adminCommand({"setParameter": 1, healthMonitoring: {dns: 'non-critical', ldap: 'off'}}));
-var result = assert.commandWorked(st.adminCommand({"getParameter": 1, healthMonitoring: 1}));
+var result = st.s0.adminCommand({"getParameter": 1, healthMonitoring: 1});
print(tojson(result));
assert.eq(result.healthMonitoring.dns, "non-critical");
assert.eq(result.healthMonitoring.ldap, "off");
+
+st.stop();
}());