jstests/sharding/sharding_statistics_server_status.js
/**
 * Set a MODE_IS collection lock on 'collectionNs' to be held for 1 hour. This will ensure that the
 * lock will not be released before desired. The operation can be killed later to release the lock.
 *
 * 'sleepComment' adds a comment so that the operation is can be identified for waitForCommand().
 */
Set a MODE_IS collection lock on 'collectionNs' to be held for 1 hour. This will ensure that the
lock will not be released before desired. The operation can be killed later to release the lock.

'sleepComment' adds a comment so that the operation is can be identified for waitForCommand().
Set a MODE_IS collection lock on ' collectionNs ' to be held for 1 hour . This will ensure that the lock will not be released before desired . The operation can be killed later to release the lock . ' sleepComment ' adds a comment so that the operation is can be identified for waitForCommand () .
function sleepFunction(host, collectionNs, sleepComment) {
    const mongo = new Mongo(host);
    assert.commandFailedWithCode(
        mongo.adminCommand(
            {sleep: 1, secs: 3600, lockTarget: collectionNs, lock: "ir", $comment: sleepComment}),
        ErrorCodes.Interrupted);
}
function sleepFunction ( host , collectionNs , sleepComment ) { const mongo = new Mongo ( host ) ; assert . commandFailedWithCode ( mongo . adminCommand ( { sleep : 1 , secs : 3600 , lockTarget : collectionNs , lock : "ir" , $comment : sleepComment } ) , ErrorCodes . Interrupted ) ; }
Set a MODE_IS collection lock on 'collectionNs' to be held for 1 hour.
Set a MODE_IS collection lock on ' collectionNs ' to be held for 1 hour .
// Set a MODE_IS collection lock to be held for 1 hours. // Holding this lock for 1 hour will trigger a test timeout.