jstests/sharding/libs/resharding_test_fixture.js
/**
     * This method can be called with failpoints that block the `reshardCollection` command from
     * proceeding to the next stage. This helper returns after either:
     *
     * 1) The node's waitForFailPoint returns successfully or
     * 2) The `reshardCollection` command has returned a response.
     *
     * The function returns true when we returned because the server reached the failpoint. The
     * function returns false when the `reshardCollection` command is no longer running.
     * Otherwise the function throws an exception.
     *
     * @private
     */
This method can be called with failpoints that block the `reshardCollection` command from
proceeding to the next stage. This helper returns after either.

1) The node's waitForFailPoint returns successfully or
2) The `reshardCollection` command has returned a response.

The function returns true when we returned because the server reached the failpoint. The
function returns false when the `reshardCollection` command is no longer running.
Otherwise the function throws an exception.

@private
This method can be called with failpoints that block the ` reshardCollection ` command from proceeding to the next stage . This helper returns after either . 1 ) The node ' s waitForFailPoint returns successfully or 2 ) The ` reshardCollection ` command has returned a response . The function returns true when we returned because the server reached the failpoint . The function returns false when the ` reshardCollection ` command is no longer running . Otherwise the function throws an exception . @private
_waitForFailPoint(fp) {
        assert.soon(
            () => {
                return this._commandDoneSignal.getCount() === 0 || fp.waitWithTimeout(1000);
            },
            "Timed out waiting for failpoint to be hit. Failpoint: " + fp.failPointName,
            undefined,
            1);
        return this._commandDoneSignal.getCount() === 1;
    }
_waitForFailPoint ( fp ) { assert . soon ( ( ) => { return this . _commandDoneSignal . getCount ( ) === 0 || fp . waitWithTimeout ( 1000 ) ; } , "Timed out waiting for failpoint to be hit. Failpoint: " + fp . failPointName , undefined , 1 ) ; return this . _commandDoneSignal . getCount ( ) === 1 ; }
This method can be called with failpoints that block the `reshardCollection` command from
 proceeding to the next stage.
This method can be called with failpoints that block the ` reshardCollection ` command from proceeding to the next stage .
// The `waitWithTimeout` command has the server block for an interval of time. // return true if the `reshardCollection` command is still running.