jstests/sharding/change_streams_shards_start_in_sync.js
// Helper function which waits for a $changeStream cursor to appear in currentOp on the given shard.
Helper function which waits for a $changeStream cursor to appear in currentOp on the given shard.
Helper function which waits for a $changeStream cursor to appear in currentOp on the given shard .
function waitForShardCursor(rs) {
    assert.soon(() => listIdleCursorsOnTestNs(rs, {
                          "cursor.originatingCommand.aggregate": {$exists: true},
                          "cursor.originatingCommand.comment": jsTestName()
                      }).length === 1,
                () => tojson(listIdleCursorsOnTestNs(rs)));
}
function waitForShardCursor ( rs ) { assert . soon ( ( ) => listIdleCursorsOnTestNs ( rs , { "cursor.originatingCommand.aggregate" : { $exists : true } , "cursor.originatingCommand.comment" : jsTestName ( ) } ) . length === 1 , ( ) => tojson ( listIdleCursorsOnTestNs ( rs ) ) ) ; }
Helper function which waits for a $changeStream cursor to appear in currentOp on the given shard.
Helper function which waits for a $changeStream cursor to appear in currentOp on the given shard .