jstests/noPassthrough/server_transaction_metrics_for_prepared_transactions.js
/**
 * Verifies that the serverStatus response has the fields that we expect.
 */
Verifies that the serverStatus response has the fields that we expect.
Verifies that the serverStatus response has the fields that we expect .
function verifyServerStatusFields(serverStatusResponse) {
    assert(serverStatusResponse.hasOwnProperty("transactions"),
           "Expected the serverStatus response to have a 'transactions' field: " +
               tojson(serverStatusResponse));
    assert(serverStatusResponse.transactions.hasOwnProperty("totalPrepared"),
           "Expected the serverStatus response to have a 'totalPrepared' field: " +
               tojson(serverStatusResponse));
    assert(serverStatusResponse.transactions.hasOwnProperty("totalPreparedThenCommitted"),
           "Expected the serverStatus response to have a 'totalPreparedThenCommitted' field: " +
               tojson(serverStatusResponse));
    assert(serverStatusResponse.transactions.hasOwnProperty("totalPreparedThenAborted"),
           "Expected the serverStatus response to have a 'totalPreparedThenAborted' field: " +
               tojson(serverStatusResponse));
    assert(serverStatusResponse.transactions.hasOwnProperty("currentPrepared"),
           "Expected the serverStatus response to have a 'currentPrepared' field: " +
               tojson(serverStatusResponse));
}
function verifyServerStatusFields ( serverStatusResponse ) { assert ( serverStatusResponse . hasOwnProperty ( "transactions" ) , "Expected the serverStatus response to have a 'transactions' field: " + tojson ( serverStatusResponse ) ) ; assert ( serverStatusResponse . transactions . hasOwnProperty ( "totalPrepared" ) , "Expected the serverStatus response to have a 'totalPrepared' field: " + tojson ( serverStatusResponse ) ) ; assert ( serverStatusResponse . transactions . hasOwnProperty ( "totalPreparedThenCommitted" ) , "Expected the serverStatus response to have a 'totalPreparedThenCommitted' field: " + tojson ( serverStatusResponse ) ) ; assert ( serverStatusResponse . transactions . hasOwnProperty ( "totalPreparedThenAborted" ) , "Expected the serverStatus response to have a 'totalPreparedThenAborted' field: " + tojson ( serverStatusResponse ) ) ; assert ( serverStatusResponse . transactions . hasOwnProperty ( "currentPrepared" ) , "Expected the serverStatus response to have a 'currentPrepared' field: " + tojson ( serverStatusResponse ) ) ; }
Verifies that the serverStatus response has the fields that we expect.
Verifies that the serverStatus response has the fields that we expect .