jstests/libs/override_methods/implicit_v1_resume_token_changestreams.js
// Override runCommand to set $_generateV2ResumeTokens on all $changeStreams.
Override runCommand to set $_generateV2ResumeTokens on all $changeStreams.
Override runCommand to set $_generateV2ResumeTokens on all $changeStreams .
function runCommandV1Tokens(conn, dbName, cmdName, cmdObj, originalRunCommand, makeRunCommandArgs) {
    if (OverrideHelpers.isAggregationWithChangeStreamStage(cmdName, cmdObj)) {
        cmdObj = Object.assign({}, cmdObj, {$_generateV2ResumeTokens: false});
    }
    return originalRunCommand.apply(conn, makeRunCommandArgs(cmdObj));
}
function runCommandV1Tokens ( conn , dbName , cmdName , cmdObj , originalRunCommand , makeRunCommandArgs ) { if ( OverrideHelpers . isAggregationWithChangeStreamStage ( cmdName , cmdObj ) ) { cmdObj = Object . assign ( { } , cmdObj , { $_generateV2ResumeTokens : false } ) ; } return originalRunCommand . apply ( conn , makeRunCommandArgs ( cmdObj ) ) ; }
Override runCommand to set $_generateV2ResumeTokens on all $changeStreams.
Override runCommand to set $_generateV2ResumeTokens on all $changeStreams .
// Make a copy to avoid mutating the user's original command object.