diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-11-24 15:03:19 -0500 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2014-12-15 17:20:39 -0500 |
commit | c052295f3eb8081db74be4f1e4ff48f02085a9f8 (patch) | |
tree | b7d5a95e6efa0a9e764bf51ca3725d3c8213191f /jstests/tool/dumprestoreWithNoOptions.js | |
parent | ab70613187b0f2c1488a4fe6750b2f51da278afb (diff) | |
download | mongo-c052295f3eb8081db74be4f1e4ff48f02085a9f8.tar.gz |
SERVER-16186: newCollectionsUsePowerOf2Sizes should warn users it no longer works
Diffstat (limited to 'jstests/tool/dumprestoreWithNoOptions.js')
-rw-r--r-- | jstests/tool/dumprestoreWithNoOptions.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/jstests/tool/dumprestoreWithNoOptions.js b/jstests/tool/dumprestoreWithNoOptions.js index ecb3591a190..d9a4731b5c0 100644 --- a/jstests/tool/dumprestoreWithNoOptions.js +++ b/jstests/tool/dumprestoreWithNoOptions.js @@ -23,6 +23,14 @@ dbname2 = "NOT_"+dbname; db.dropDatabase(); +// MMapV1 always sets newcollectionsusepowerof2sizes, WT does not +defaultFlags = { "flags" : 1 } +var ss = db.serverStatus(); + +if (ss.storageEngine.name != "mmapv1") { + defaultFlags = {}; +} + var options = { capped: true, size: 4096, autoIndexId: true }; db.createCollection('capped', options); assert.eq( 1, db.capped.getIndexes().length, "auto index not created" ); @@ -45,7 +53,7 @@ t.runTool( "restore" , "--dir" , t.ext , "--noOptionsRestore"); assert.eq( 1, db.capped.count() , "wrong number of docs restored to capped" ); assert(true !== db.capped.stats().capped, "restore options were not ignored"); -assert.eq( {}, db.capped.exists().options, +assert.eq( defaultFlags, db.capped.exists().options, "restore options not ignored: " + tojson( db.capped.exists() ) ); // Dump/restore single DB @@ -74,7 +82,7 @@ db = db.getSiblingDB(dbname2); assert.eq( 1, db.capped.count() , "wrong number of docs restored to capped" ); assert(true !== db.capped.stats().capped, "restore options were not ignored"); -assert.eq( {}, db.capped.exists().options, +assert.eq( defaultFlags, db.capped.exists().options, "restore options not ignored: " + tojson( db.capped.exists() ) ); // Dump/restore single collection @@ -106,7 +114,7 @@ db = db.getSiblingDB(dbname); assert.eq( 1, db.capped.count() , "wrong number of docs restored to capped" ); assert( true !== db.capped.stats().capped, "restore options were not ignored" ); -assert.eq( {}, db.capped.exists().options, +assert.eq( defaultFlags, db.capped.exists().options, "restore options not ignored: " + tojson( db.capped.exists() ) ); t.stop(); |