jstests/replsets/libs/election_metrics.js
/**
 * Verifies that the given field in serverStatus is incremented in the way we expect.
 */
Verifies that the given field in serverStatus is incremented in the way we expect.
Verifies that the given field in serverStatus is incremented in the way we expect .
function verifyServerStatusChange(initialStatus, newStatus, fieldName, expectedIncrement) {
    assert.eq(initialStatus[fieldName] + expectedIncrement,
              newStatus[fieldName],
              `expected '${fieldName}' to increase by ${expectedIncrement}`);
}
function verifyServerStatusChange ( initialStatus , newStatus , fieldName , expectedIncrement ) { assert . eq ( initialStatus [ fieldName ] + expectedIncrement , newStatus [ fieldName ] , ` ${ fieldName } ${ expectedIncrement } ` ) ; }
Verifies that the given field in serverStatus is incremented in the way we expect.
Verifies that the given field in serverStatus is incremented in the way we expect .