jstests/replsets/index_delete.js
/**
 * This test builds an index and then drops the index once the secondary has started building it.
 * After the drop, we assert that the secondary no longer has the index.
 * We then create two indexes and assert that dropping all indexes with '*' replicates properly.
 * @tags: [multiversion_incompatible]
 */
This test builds an index and then drops the index once the secondary has started building it.
After the drop, we assert that the secondary no longer has the index.
We then create two indexes and assert that dropping all indexes with '*' replicates properly.
This test builds an index and then drops the index once the secondary has started building it . After the drop we assert that the secondary no longer has the index . We then create two indexes and assert that dropping all indexes with ' * ' replicates properly .
function indexBuildInProgress(checkDB) {
    var inprog = checkDB.currentOp().inprog;
    var indexOps = inprog.filter(function(op) {
        if (op.msg && op.msg.includes('Index Build')) {
            if (op.progress && (op.progress.done / op.progress.total) > 0.20) {
                printjson(op);
                return true;
            }
        }
    });
    return indexOps.length > 0;
}
function indexBuildInProgress ( checkDB ) { var inprog = checkDB . currentOp ( ) . inprog ; var indexOps = inprog . filter ( function ( op ) { if ( op . msg && op . msg . includes ( 'Index Build' ) ) { if ( op . progress && ( op . progress . done / op . progress . total ) > 0.20 ) { printjson ( op ) ; return true ; } } } ) ; return indexOps . length > 0 ; }
This test builds an index and then drops the index once the secondary has started building it.
This test builds an index and then drops the index once the secondary has started building it .