summaryrefslogtreecommitdiff
path: root/jstests/core/delx.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/delx.js')
-rw-r--r--jstests/core/delx.js35
1 files changed, 19 insertions, 16 deletions
diff --git a/jstests/core/delx.js b/jstests/core/delx.js
index c4e3ca263d6..004b54ee6ca 100644
--- a/jstests/core/delx.js
+++ b/jstests/core/delx.js
@@ -1,31 +1,34 @@
-a = db.getSisterDB("delxa" );
-b = db.getSisterDB("delxb" );
+a = db.getSisterDB("delxa");
+b = db.getSisterDB("delxb");
-function setup( mydb ){
+function setup(mydb) {
mydb.dropDatabase();
- for ( i=0; i<100; i++ ){
- mydb.foo.insert( { _id : i } );
+ for (i = 0; i < 100; i++) {
+ mydb.foo.insert({_id: i});
}
}
-setup( a );
-setup( b );
+setup(a);
+setup(b);
-assert.eq( 100 , a.foo.find().itcount() , "A1" );
-assert.eq( 100 , b.foo.find().itcount() , "A2" );
+assert.eq(100, a.foo.find().itcount(), "A1");
+assert.eq(100, b.foo.find().itcount(), "A2");
-x = a.foo.find().sort( { _id : 1 } ).batchSize( 60 );
-y = b.foo.find().sort( { _id : 1 } ).batchSize( 60 );
+x = a.foo.find().sort({_id: 1}).batchSize(60);
+y = b.foo.find().sort({_id: 1}).batchSize(60);
x.next();
y.next();
-a.foo.remove( { _id : { $gt : 50 } } );
+a.foo.remove({_id: {$gt: 50}});
-assert.eq( 51 , a.foo.find().itcount() , "B1" );
-assert.eq( 100 , b.foo.find().itcount() , "B2" );
+assert.eq(51, a.foo.find().itcount(), "B1");
+assert.eq(100, b.foo.find().itcount(), "B2");
xCount = x.itcount();
-assert( xCount == 59 || xCount == 99, "C1 : " + xCount ); // snapshot or not is ok
-assert.eq( 99 , y.itcount() , "C2" ); // this was asserting because ClientCursor byLoc doesn't take db into consideration
+assert(xCount == 59 || xCount == 99, "C1 : " + xCount); // snapshot or not is ok
+assert.eq(
+ 99,
+ y.itcount(),
+ "C2"); // this was asserting because ClientCursor byLoc doesn't take db into consideration