summaryrefslogtreecommitdiff
path: root/jstests/mmap_v1/extent2.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/mmap_v1/extent2.js')
-rw-r--r--jstests/mmap_v1/extent2.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/jstests/mmap_v1/extent2.js b/jstests/mmap_v1/extent2.js
index 3b4dc54ca74..269ac645986 100644
--- a/jstests/mmap_v1/extent2.js
+++ b/jstests/mmap_v1/extent2.js
@@ -1,15 +1,15 @@
-mydb = db.getSisterDB( "test_extent2" );
+mydb = db.getSisterDB("test_extent2");
mydb.dropDatabase();
t = mydb.foo;
-function insert(){
- t.insert( { _id : 1 , x : 1 } );
- t.insert( { _id : 2 , x : 1 } );
- t.insert( { _id : 3 , x : 1 } );
- t.ensureIndex( { x : 1 } );
+function insert() {
+ t.insert({_id: 1, x: 1});
+ t.insert({_id: 2, x: 1});
+ t.insert({_id: 3, x: 1});
+ t.ensureIndex({x: 1});
}
insert();
@@ -17,18 +17,18 @@ t.drop();
start = mydb.stats();
-for ( i=0; i<100; i++ ) {
+for (i = 0; i < 100; i++) {
insert();
t.drop();
}
end = mydb.stats();
-printjson( start );
-printjson( end );
-assert.eq( start.extentFreeList.num, end.extentFreeList.num );
+printjson(start);
+printjson(end);
+assert.eq(start.extentFreeList.num, end.extentFreeList.num);
// 3: 1 data, 1 _id idx, 1 x idx
// used to be 4, but we no longer waste an extent for the freelist
-assert.eq( 3, start.extentFreeList.num );
-assert.eq( 3, end.extentFreeList.num );
+assert.eq(3, start.extentFreeList.num);
+assert.eq(3, end.extentFreeList.num);