diff options
Diffstat (limited to 'jstests/core/remove9.js')
-rw-r--r-- | jstests/core/remove9.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/jstests/core/remove9.js b/jstests/core/remove9.js index 85e9002d108..1c82d7b4fce 100644 --- a/jstests/core/remove9.js +++ b/jstests/core/remove9.js @@ -2,15 +2,16 @@ t = db.jstests_remove9; t.drop(); -t.ensureIndex( {i:1} ); -for( i = 0; i < 1000; ++i ) { - t.save( {i:i} ); +t.ensureIndex({i: 1}); +for (i = 0; i < 1000; ++i) { + t.save({i: i}); } -s = startParallelShell( 't = db.jstests_remove9; Random.setRandomSeed(); for( j = 0; j < 5000; ++j ) { i = Random.randInt( 499 ) * 2; t.update( {i:i}, {$set:{i:2000}} ); t.remove( {i:2000} ); t.save( {i:i} ); }' ); +s = startParallelShell( + 't = db.jstests_remove9; Random.setRandomSeed(); for( j = 0; j < 5000; ++j ) { i = Random.randInt( 499 ) * 2; t.update( {i:i}, {$set:{i:2000}} ); t.remove( {i:2000} ); t.save( {i:i} ); }'); -for( i = 0; i < 1000; ++i ) { - assert.eq( 500, t.find( {i:{$gte:0,$mod:[2,1]}} ).hint( {i:1} ).itcount() ); +for (i = 0; i < 1000; ++i) { + assert.eq(500, t.find({i: {$gte: 0, $mod: [2, 1]}}).hint({i: 1}).itcount()); } s(); |