diff options
Diffstat (limited to 'jstests/noPassthrough/awaitdata_getmore_cmd.js')
-rw-r--r-- | jstests/noPassthrough/awaitdata_getmore_cmd.js | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/jstests/noPassthrough/awaitdata_getmore_cmd.js b/jstests/noPassthrough/awaitdata_getmore_cmd.js index 276e464145b..ef47efb0e67 100644 --- a/jstests/noPassthrough/awaitdata_getmore_cmd.js +++ b/jstests/noPassthrough/awaitdata_getmore_cmd.js @@ -47,13 +47,8 @@ assert.eq(cmdRes.cursor.ns, coll.getFullName()); // Should also succeed if maxTimeMS is supplied on the original find. - cmdRes = db.runCommand({ - find: collName, - batchSize: 2, - awaitData: true, - tailable: true, - maxTimeMS: 2000 - }); + cmdRes = db.runCommand( + {find: collName, batchSize: 2, awaitData: true, tailable: true, maxTimeMS: 2000}); assert.commandWorked(cmdRes); assert.gt(cmdRes.cursor.id, NumberLong(0)); assert.eq(cmdRes.cursor.ns, coll.getFullName()); @@ -105,33 +100,23 @@ assert.gte((new Date()) - now, 2000); // Repeat the test, this time tailing the oplog rather than a user-created capped collection. - cmdRes = localDB.runCommand({ - find: oplogColl.getName(), - batchSize: 2, - awaitData: true, - tailable: true - }); + cmdRes = localDB.runCommand( + {find: oplogColl.getName(), batchSize: 2, awaitData: true, tailable: true}); assert.commandWorked(cmdRes); assert.gt(cmdRes.cursor.id, NumberLong(0)); assert.eq(cmdRes.cursor.ns, oplogColl.getFullName()); assert.eq(cmdRes.cursor.firstBatch.length, 2); - cmdRes = localDB.runCommand({ - getMore: cmdRes.cursor.id, - collection: oplogColl.getName(), - maxTimeMS: 1000 - }); + cmdRes = localDB.runCommand( + {getMore: cmdRes.cursor.id, collection: oplogColl.getName(), maxTimeMS: 1000}); assert.commandWorked(cmdRes); assert.gt(cmdRes.cursor.id, NumberLong(0)); assert.eq(cmdRes.cursor.ns, oplogColl.getFullName()); while (cmdRes.cursor.nextBatch.length > 0) { now = new Date(); - cmdRes = localDB.runCommand({ - getMore: cmdRes.cursor.id, - collection: oplogColl.getName(), - maxTimeMS: 4000 - }); + cmdRes = localDB.runCommand( + {getMore: cmdRes.cursor.id, collection: oplogColl.getName(), maxTimeMS: 4000}); assert.commandWorked(cmdRes); assert.gt(cmdRes.cursor.id, NumberLong(0)); assert.eq(cmdRes.cursor.ns, oplogColl.getFullName()); |