jstests/replsets/txn_override_unittests.js
/**
 * Runs a specific test case, resetting test state before and after.
 */
Runs a specific test case, resetting test state before and after.
Runs a specific test case resetting test state before and after .
function runTest(testSuite, testCase) {
    coll1.drop({writeConcern: {w: "majority"}});
    coll2.drop({writeConcern: {w: "majority"}});
    clearAllCommandOverrides();
    stopFailingCommands();
    jsTestLog(testSuite + ": Testing " + testCase.name);
    testCase.test();
    endCurrentTransactionIfOpen();
    jsTestLog(testSuite + ": Test " + testCase.name + " complete.");
    clearAllCommandOverrides();
    stopFailingCommands();
}
function runTest ( testSuite , testCase ) { coll1 . drop ( { writeConcern : { w : "majority" } } ) ; coll2 . drop ( { writeConcern : { w : "majority" } } ) ; clearAllCommandOverrides ( ) ; stopFailingCommands ( ) ; jsTestLog ( testSuite + ": Testing " + testCase . name ) ; testCase . test ( ) ; endCurrentTransactionIfOpen ( ) ; jsTestLog ( testSuite + ": Test " + testCase . name + " complete." ) ; clearAllCommandOverrides ( ) ; stopFailingCommands ( ) ; }
Runs a specific test case, resetting test state before and after.
Runs a specific test case resetting test state before and after .
// Drop with majority write concern to ensure transactions in subsequent test cases can // immediately take locks on either collection. // Ensure all overrides and failpoints have been turned off before running the test. // End the current transaction if the test did not end it itself. // Ensure all overrides and failpoints have been turned off after running the test as well.