jstests/noPassthrough/server_write_concern_metrics.js
// Verifies that the server status response has the fields that we expect.
Verifies that the server status response has the fields that we expect.
Verifies that the server status response has the fields that we expect .
function verifyServerStatusFields(serverStatusResponse) {
    assert(serverStatusResponse.hasOwnProperty("opWriteConcernCounters"),
           "Expected the serverStatus response to have a 'opWriteConcernCounters' field\n" +
               tojson(serverStatusResponse));
    assert(serverStatusResponse.opWriteConcernCounters.hasOwnProperty("insert"),
           "The 'opWriteConcernCounters' field in serverStatus did not have the 'insert' field\n" +
               tojson(serverStatusResponse.opWriteConcernCounters));
    assert(serverStatusResponse.opWriteConcernCounters.hasOwnProperty("update"),
           "The 'opWriteConcernCounters' field in serverStatus did not have the 'update' field\n" +
               tojson(serverStatusResponse.opWriteConcernCounters));
    assert(serverStatusResponse.opWriteConcernCounters.hasOwnProperty("delete"),
           "The 'opWriteConcernCounters' field in serverStatus did not have the 'delete' field\n" +
               tojson(serverStatusResponse.opWriteConcernCounters));
}
function verifyServerStatusFields ( serverStatusResponse ) { assert ( serverStatusResponse . hasOwnProperty ( "opWriteConcernCounters" ) , "Expected the serverStatus response to have a 'opWriteConcernCounters' field\n" + tojson ( serverStatusResponse ) ) ; assert ( serverStatusResponse . opWriteConcernCounters . hasOwnProperty ( "insert" ) , "The 'opWriteConcernCounters' field in serverStatus did not have the 'insert' field\n" + tojson ( serverStatusResponse . opWriteConcernCounters ) ) ; assert ( serverStatusResponse . opWriteConcernCounters . hasOwnProperty ( "update" ) , "The 'opWriteConcernCounters' field in serverStatus did not have the 'update' field\n" + tojson ( serverStatusResponse . opWriteConcernCounters ) ) ; assert ( serverStatusResponse . opWriteConcernCounters . hasOwnProperty ( "delete" ) , "The 'opWriteConcernCounters' field in serverStatus did not have the 'delete' field\n" + tojson ( serverStatusResponse . opWriteConcernCounters ) ) ; }
Verifies that the server status response has the fields that we expect.
Verifies that the server status response has the fields that we expect .