diff options
author | Judah Schvimer <judah@mongodb.com> | 2018-05-01 13:24:52 -0400 |
---|---|---|
committer | Judah Schvimer <judah@mongodb.com> | 2018-05-01 13:27:28 -0400 |
commit | 141c56e831213ea09ccad05b4e022b1178035440 (patch) | |
tree | 2e91b9c14b994dbaa347c4d98026e986f2af1f1c /jstests/free_mon | |
parent | 0ab171caf6aaebf044e52d3f491f7f13e6858e9a (diff) | |
download | mongo-141c56e831213ea09ccad05b4e022b1178035440.tar.gz |
Revert "SERVER-34229 Add free monitoring to serverStatus"
This reverts commit 1c5629c05fa9b08752688c021f7a6beef3a20dca.
Diffstat (limited to 'jstests/free_mon')
-rw-r--r-- | jstests/free_mon/free_mon_http_down.js | 4 | ||||
-rw-r--r-- | jstests/free_mon/free_mon_server_status.js | 48 |
2 files changed, 0 insertions, 52 deletions
diff --git a/jstests/free_mon/free_mon_http_down.js b/jstests/free_mon/free_mon_http_down.js index 019b50f23eb..aff229614c4 100644 --- a/jstests/free_mon/free_mon_http_down.js +++ b/jstests/free_mon/free_mon_http_down.js @@ -17,13 +17,9 @@ load("jstests/free_mon/libs/free_mon.js"); const conn = MongoRunner.runMongod(options); assert.neq(null, conn, 'mongod was unable to start up'); - const admin = conn.getDB('admin'); mock_web.waitRegisters(3); - const freeMonStats = assert.commandWorked(admin.runCommand({serverStatus: 1})).freeMonitoring; - assert.gte(freeMonStats.registerErrors, 3); - MongoRunner.stopMongod(conn); mock_web.stop(); diff --git a/jstests/free_mon/free_mon_server_status.js b/jstests/free_mon/free_mon_server_status.js deleted file mode 100644 index 5a7fc991831..00000000000 --- a/jstests/free_mon/free_mon_server_status.js +++ /dev/null @@ -1,48 +0,0 @@ -// Validate serverStatus output. -// -load("jstests/free_mon/libs/free_mon.js"); - -(function() { - 'use strict'; - - const mock_web = new FreeMonWebServer(); - mock_web.start(); - - const mongod = MongoRunner.runMongod({ - setParameter: "cloudFreeMonitoringEndpointURL=" + mock_web.getURL(), - }); - assert.neq(mongod, null, 'mongod not running'); - const admin = mongod.getDB('admin'); - - const kRetryIntervalSecs = 1; - function freeMonStats() { - return assert.commandWorked(admin.runCommand({serverStatus: 1})).freeMonitoring; - } - - // Initial state. - assert.eq(freeMonStats().state, 'undecided'); - - assert.commandWorked(admin.runCommand({setFreeMonitoring: 1, action: 'enable'})); - WaitForRegistration(mongod); - - const enabled = freeMonStats(); - assert.eq(enabled.state, 'enabled'); - assert.eq(enabled.retryIntervalSecs, kRetryIntervalSecs); - assert.eq(enabled.registerErrors, 0); - assert.eq(enabled.metricsErrors, 0); - - // Explicitly disabled. - assert.commandWorked(admin.runCommand({setFreeMonitoring: 1, action: 'disable'})); - sleep(2); // Give the async command time to run. - - const disabled = freeMonStats(); - assert.eq(disabled.state, 'disabled'); - assert.eq(disabled.retryIntervalSecs, kRetryIntervalSecs); - assert.eq(disabled.registerErrors, 0); - assert.eq(disabled.metricsErrors, 0); - - // Enabled. - // Cleanup. - MongoRunner.stopMongod(mongod); - mock_web.stop(); -})(); |