diff options
author | Sara Golemon <sara.golemon@mongodb.com> | 2018-04-27 15:38:44 -0400 |
---|---|---|
committer | Sara Golemon <sara.golemon@mongodb.com> | 2018-05-03 16:04:43 -0400 |
commit | 397af5415328cbf53c7d70b514d25d32c7b8c3c6 (patch) | |
tree | 25b8572fcc09255096130d8cd2aa63d64c53a661 /jstests/free_mon/free_mon_server_status.js | |
parent | 91db8033a2ddc65b682d16f46fc00cde7949e9fc (diff) | |
download | mongo-397af5415328cbf53c7d70b514d25d32c7b8c3c6.tar.gz |
SERVER-34233 Implement shell helpers for free monitoring
Diffstat (limited to 'jstests/free_mon/free_mon_server_status.js')
-rw-r--r-- | jstests/free_mon/free_mon_server_status.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/free_mon/free_mon_server_status.js b/jstests/free_mon/free_mon_server_status.js index 5a7fc991831..0dce068a494 100644 --- a/jstests/free_mon/free_mon_server_status.js +++ b/jstests/free_mon/free_mon_server_status.js @@ -22,9 +22,10 @@ load("jstests/free_mon/libs/free_mon.js"); // Initial state. assert.eq(freeMonStats().state, 'undecided'); - assert.commandWorked(admin.runCommand({setFreeMonitoring: 1, action: 'enable'})); + admin.enableFreeMonitoring(); WaitForRegistration(mongod); + // Enabled. const enabled = freeMonStats(); assert.eq(enabled.state, 'enabled'); assert.eq(enabled.retryIntervalSecs, kRetryIntervalSecs); @@ -32,7 +33,7 @@ load("jstests/free_mon/libs/free_mon.js"); assert.eq(enabled.metricsErrors, 0); // Explicitly disabled. - assert.commandWorked(admin.runCommand({setFreeMonitoring: 1, action: 'disable'})); + admin.disableFreeMonitoring(); sleep(2); // Give the async command time to run. const disabled = freeMonStats(); @@ -41,7 +42,6 @@ load("jstests/free_mon/libs/free_mon.js"); assert.eq(disabled.registerErrors, 0); assert.eq(disabled.metricsErrors, 0); - // Enabled. // Cleanup. MongoRunner.stopMongod(mongod); mock_web.stop(); |