jstests/noPassthrough/libs/index_build.js
/**
     * Checks the db.currentOp() output for the index build with opId.
     *
     * An optional 'onOperationFn' callback accepts an operation to perform any additional checks.
     */
Checks the db.currentOp() output for the index build with opId.
An optional 'onOperationFn' callback accepts an operation to perform any additional checks.
Checks the db . currentOp () output for the index build with opId . An optional ' onOperationFn ' callback accepts an operation to perform any additional checks .
static assertIndexBuildCurrentOpContents(database, opId, onOperationFn) {
        const inprog = database.currentOp({opid: opId, "$all": true}).inprog;
        assert.eq(1,
                  inprog.length,
                  'unable to find opid ' + opId +
                      ' in currentOp() result: ' + tojson(database.currentOp()));
        const op = inprog[0];
        assert.eq(opId, op.opid, 'db.currentOp() returned wrong index build info: ' + tojson(op));
        if (onOperationFn) {
            onOperationFn(op);
        }
    }
static assertIndexBuildCurrentOpContents ( database , opId , onOperationFn ) { const inprog = database . currentOp ( { opid : opId , "$all" : true } ) . inprog ; assert . eq ( 1 , inprog . length , 'unable to find opid ' + opId + ' in currentOp() result: ' + tojson ( database . currentOp ( ) ) ) ; const op = inprog [ 0 ] ; assert . eq ( opId , op . opid , 'db.currentOp() returned wrong index build info: ' + tojson ( op ) ) ; if ( onOperationFn ) { onOperationFn ( op ) ; } }
Checks the db.currentOp() output for the index build with opId.
Checks the db . currentOp () output for the index build with opId .