diff options
author | Geert Bosch <geert@mongodb.com> | 2018-06-12 17:27:01 -0400 |
---|---|---|
committer | Geert Bosch <geert@mongodb.com> | 2018-06-25 16:47:18 -0400 |
commit | ab0c426e60c4bdcc49b5a48a93f84828414d5ba6 (patch) | |
tree | 59eea717b0cae54e39b4981d654fd58d31d7b286 /jstests/disk/preallocate.js | |
parent | 5339c9a55181662545652ab7106c8f4e55109327 (diff) | |
download | mongo-ab0c426e60c4bdcc49b5a48a93f84828414d5ba6.tar.gz |
SERVER-35591 Remove MMAPv1 testing
Diffstat (limited to 'jstests/disk/preallocate.js')
-rw-r--r-- | jstests/disk/preallocate.js | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/jstests/disk/preallocate.js b/jstests/disk/preallocate.js deleted file mode 100644 index e8ff9961a14..00000000000 --- a/jstests/disk/preallocate.js +++ /dev/null @@ -1,51 +0,0 @@ -// check that there is preallocation, and there are 2 files - -// Preallocation is an mmap only behavior. -// @tags: [requires_mmapv1] - -var baseName = "jstests_preallocate"; - -var m = MongoRunner.runMongod({}); - -var getTotalNonLocalNonAdminSize = function() { - var totalNonLocalNonAdminDBSize = 0; - m.getDBs().databases.forEach(function(dbStats) { - // We accept the local database's and admin database's space overhead. - if (dbStats.name == "local" || dbStats.name == "admin") - return; - - // Databases with "sizeOnDisk=1" and "empty=true" dont' actually take up space o disk. - // See SERVER-11051. - if (dbStats.sizeOnDisk == 1 && dbStats.empty) - return; - totalNonLocalNonAdminDBSize += dbStats.sizeOnDisk; - }); - return totalNonLocalNonAdminDBSize; -}; - -assert.eq(0, getTotalNonLocalNonAdminSize()); - -m.getDB(baseName).createCollection(baseName + "1"); - -// Windows does not currently use preallocation -expectedMB = 64 + 16; -if (m.getDB(baseName).serverBits() < 64) - expectedMB /= 4; - -assert.soon(function() { - return getTotalNonLocalNonAdminSize() >= expectedMB * 1024 * 1024; -}, "\n\n\nFAIL preallocate.js expected second file to bring total size over " + expectedMB + "MB"); - -MongoRunner.stopMongod(m); - -m = MongoRunner.runMongod({restart: true, cleanData: false, dbpath: m.dbpath}); - -size = getTotalNonLocalNonAdminSize(); - -m.getDB(baseName).createCollection(baseName + "2"); - -sleep(2000); // give prealloc a chance - -assert.eq(size, getTotalNonLocalNonAdminSize()); - -MongoRunner.stopMongod(m); |