jstests/sharding/update_shard_key_conflicting_writes.js
// Returns true if the command "cmdName" has started running on the server.
Returns true if the command "cmdName" has started running on the server.
Returns true if the command " cmdName " has started running on the server .
function opStarted(cmdName) {
    return mongos.getDB(kDbName).currentOp().inprog.some(op => {
        return op.active && (op.ns === "db.foo") && (op.op === cmdName);
    });
}
function opStarted ( cmdName ) { return mongos . getDB ( kDbName ) . currentOp ( ) . inprog . some ( op => { return op . active && ( op . ns === "db.foo" ) && ( op . op === cmdName ) ; } ) ; }
Returns true if the command "cmdName" has started running on the server.
Returns true if the command " cmdName " has started running on the server .