diff options
Diffstat (limited to 'jstests/mmap_v1')
-rw-r--r-- | jstests/mmap_v1/capped2.js | 4 | ||||
-rw-r--r-- | jstests/mmap_v1/capped8.js | 5 | ||||
-rw-r--r-- | jstests/mmap_v1/collmod.js | 5 | ||||
-rw-r--r-- | jstests/mmap_v1/datasize.js | 26 | ||||
-rw-r--r-- | jstests/mmap_v1/datasize3.js | 4 | ||||
-rw-r--r-- | jstests/mmap_v1/update.js | 6 | ||||
-rw-r--r-- | jstests/mmap_v1/use_power_of_2.js | 10 |
7 files changed, 20 insertions, 40 deletions
diff --git a/jstests/mmap_v1/capped2.js b/jstests/mmap_v1/capped2.js index ae74a396f98..82a6dca3874 100644 --- a/jstests/mmap_v1/capped2.js +++ b/jstests/mmap_v1/capped2.js @@ -9,9 +9,7 @@ function debug(x) { var val = new Array(2000); var c = ""; for (i = 0; i < 2000; ++i, c += "---") { // bigger and bigger objects through the array... - val[i] = { - a: c - }; + val[i] = {a: c}; } function checkIncreasing(i) { diff --git a/jstests/mmap_v1/capped8.js b/jstests/mmap_v1/capped8.js index 68b3deb0b2a..78b9d1b2017 100644 --- a/jstests/mmap_v1/capped8.js +++ b/jstests/mmap_v1/capped8.js @@ -10,10 +10,7 @@ function debug(x) { /** Generate an object with a string field of specified length */ function obj(size, x) { - return { - X: x, - a: new Array(size + 1).toString() - }; + return {X: x, a: new Array(size + 1).toString()}; } function withinTwo(a, b) { diff --git a/jstests/mmap_v1/collmod.js b/jstests/mmap_v1/collmod.js index 53c83f7d927..0ac6e98df60 100644 --- a/jstests/mmap_v1/collmod.js +++ b/jstests/mmap_v1/collmod.js @@ -54,9 +54,8 @@ assert.eq(0, res.ok, "TTL mod shouldn't work with non-numeric expireAfterSeconds var res = db.runCommand({"collMod": coll, "index": {"keyPattern": {a: 1}, "expireAfterSeconds": 100}}); debug(res); -assert.eq(1, - db.system.indexes.count({key: {a: 1}, expireAfterSeconds: 100}), - "TTL index not modified"); +assert.eq( + 1, db.system.indexes.count({key: {a: 1}, expireAfterSeconds: 100}), "TTL index not modified"); // try to modify a faulty TTL index with a non-numeric expireAfterSeconds field t.dropIndex({a: 1}); diff --git a/jstests/mmap_v1/datasize.js b/jstests/mmap_v1/datasize.js index 8c61b927748..d12527a8922 100644 --- a/jstests/mmap_v1/datasize.js +++ b/jstests/mmap_v1/datasize.js @@ -27,20 +27,16 @@ assert.eq(96, db.runCommand({datasize: "test.jstests_datasize", min: {qq: 'a'}, max: {qq: 'z'}}).size); assert.eq(48, db.runCommand({datasize: "test.jstests_datasize", min: {qq: 'a'}, max: {qq: 'd'}}).size); -assert.eq(48, - db.runCommand({ - datasize: "test.jstests_datasize", - min: {qq: 'a'}, - max: {qq: 'd'}, - keyPattern: {qq: 1} - }).size); -assert.eq(48, - db.runCommand({ - datasize: "test.jstests_datasize", - min: {qq: 'd'}, - max: {qq: 'z'}, - keyPattern: {qq: 1} - }).size); +assert.eq( + 48, + db.runCommand( + {datasize: "test.jstests_datasize", min: {qq: 'a'}, max: {qq: 'd'}, keyPattern: {qq: 1}}) + .size); +assert.eq( + 48, + db.runCommand( + {datasize: "test.jstests_datasize", min: {qq: 'd'}, max: {qq: 'z'}, keyPattern: {qq: 1}}) + .size); assert.eq(0, db.runCommand({datasize: "test.jstests_datasize", min: {qq: 'c'}, max: {qq: 'c'}}).size); @@ -50,5 +46,5 @@ assert.eq(48, assert.eq( 0, db.runCommand( - {datasize: "test.jstests_datasize", min: {qq: 'a'}, max: {qq: 'd'}, keyPattern: {a: 1}}) + {datasize: "test.jstests_datasize", min: {qq: 'a'}, max: {qq: 'd'}, keyPattern: {a: 1}}) .ok); diff --git a/jstests/mmap_v1/datasize3.js b/jstests/mmap_v1/datasize3.js index cefcdcf9949..da5d89384b2 100644 --- a/jstests/mmap_v1/datasize3.js +++ b/jstests/mmap_v1/datasize3.js @@ -3,9 +3,7 @@ t = db.datasize3; t.drop(); function run(options) { - var c = { - dataSize: "test.datasize3" - }; + var c = {dataSize: "test.datasize3"}; if (options) Object.extend(c, options); return db.runCommand(c); diff --git a/jstests/mmap_v1/update.js b/jstests/mmap_v1/update.js index fd96337aacf..3e132ca666a 100644 --- a/jstests/mmap_v1/update.js +++ b/jstests/mmap_v1/update.js @@ -11,9 +11,7 @@ var iterations = _isWindows() ? 2500 : 5000; // fill db for (var i = 1; i <= iterations; i++) { - var obj = { - txt: txt - }; + var obj = {txt: txt}; asdf.save(obj); var obj2 = { @@ -36,7 +34,7 @@ var stats = db.runCommand({collstats: "asdf"}); // basic // testing of the collstats command at the same time assert(stats.count == iterations); -assert(stats.size<140433012 * 5 && stats.size> 1000000); +assert(stats.size < 140433012 * 5 && stats.size > 1000000); assert(stats.numExtents < 20); assert(stats.nindexes == 1); diff --git a/jstests/mmap_v1/use_power_of_2.js b/jstests/mmap_v1/use_power_of_2.js index a192a79653d..b3db7077e1d 100644 --- a/jstests/mmap_v1/use_power_of_2.js +++ b/jstests/mmap_v1/use_power_of_2.js @@ -5,14 +5,8 @@ */ // prepare a doc of 14K -var doc = { - _id: new Object(), - data: "a" -}; -var bigDoc = { - _id: new Object(), - data: "a" -}; +var doc = {_id: new Object(), data: "a"}; +var bigDoc = {_id: new Object(), data: "a"}; while (doc.data.length < 14 * 1024) doc.data += "a"; |