diff options
Diffstat (limited to 'jstests/mmap_v1/repair_cursor1.js')
-rw-r--r-- | jstests/mmap_v1/repair_cursor1.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/jstests/mmap_v1/repair_cursor1.js b/jstests/mmap_v1/repair_cursor1.js index 93362ff8c24..fefc9bbdecb 100644 --- a/jstests/mmap_v1/repair_cursor1.js +++ b/jstests/mmap_v1/repair_cursor1.js @@ -2,20 +2,18 @@ t = db.repair_cursor1; t.drop(); -t.insert( { x : 1 } ); -t.insert( { x : 2 } ); +t.insert({x: 1}); +t.insert({x: 2}); -res = t.runCommand( "repairCursor" ); -assert( res.ok, tojson( res ) ); +res = t.runCommand("repairCursor"); +assert(res.ok, tojson(res)); t2 = db.repair_cursor1a; t2.drop(); -cursor = new DBCommandCursor( db._mongo, res ); -cursor.forEach( function(z){ t2.insert(z); } ); -assert.eq( t.find().itcount(), t2.find().itcount() ); -assert.eq( t.hashAllDocs(), t2.hashAllDocs() ); - - - - +cursor = new DBCommandCursor(db._mongo, res); +cursor.forEach(function(z) { + t2.insert(z); +}); +assert.eq(t.find().itcount(), t2.find().itcount()); +assert.eq(t.hashAllDocs(), t2.hashAllDocs()); |