diff options
Diffstat (limited to 'jstests/noPassthroughWithMongod/newcollection2.js')
-rw-r--r-- | jstests/noPassthroughWithMongod/newcollection2.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/jstests/noPassthroughWithMongod/newcollection2.js b/jstests/noPassthroughWithMongod/newcollection2.js index 104eec7e897..46cd1316c90 100644 --- a/jstests/noPassthroughWithMongod/newcollection2.js +++ b/jstests/noPassthroughWithMongod/newcollection2.js @@ -2,16 +2,16 @@ var baseName = "jstests_disk_newcollection2"; var m = MongoRunner.runMongod({noprealloc: "", smallfiles: ""}); -db = m.getDB( "test" ); +db = m.getDB("test"); -db.createCollection( baseName, {size:0x1FFC0000-0x10-8192} ); -var v = db[ baseName ].validate(); -printjson( v ); -assert( v.valid ); +db.createCollection(baseName, {size: 0x1FFC0000 - 0x10 - 8192}); +var v = db[baseName].validate(); +printjson(v); +assert(v.valid); // Try creating collections with some invalid names and confirm that they // don't crash MongoD. -db.runCommand({ applyOps: [ { op: 'u', ns: 'a\0b' } ] }); +db.runCommand({applyOps: [{op: 'u', ns: 'a\0b'}]}); var res = db["a\0a"].insert({}); assert(res.hasWriteError(), "A write to collection a\0a succceeded"); |