diff options
author | Dan Pasette <dan@10gen.com> | 2014-09-27 20:14:09 -0400 |
---|---|---|
committer | Dan Pasette <dan@mongodb.com> | 2014-09-29 10:25:56 -0400 |
commit | 689c0faf75e0cc3f1663b962c3db55360e0ef3b5 (patch) | |
tree | 0a5a374c7704d056c16d6ba0bbf620eb3af70f46 /jstests/dur | |
parent | 52948ec0597a4726021049c9dae6635c5a41d1a4 (diff) | |
download | mongo-689c0faf75e0cc3f1663b962c3db55360e0ef3b5.tar.gz |
SERVER-15369: Clean up partially created .ns files
Diffstat (limited to 'jstests/dur')
-rw-r--r-- | jstests/dur/diskfull.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/jstests/dur/diskfull.js b/jstests/dur/diskfull.js index a604439424d..6fb38a15d1b 100644 --- a/jstests/dur/diskfull.js +++ b/jstests/dur/diskfull.js @@ -1,4 +1,13 @@ -/** Test running out of disk space with durability enabled */ +/** Test running out of disk space with durability enabled. +To set up the test, it's required to set up a small partition something like the following: +sudo umount /data/db/diskfulltest/ +rm -rf /data/db/diskfulltest +mkdir -p /data/images +dd bs=512 count=83968 if=/dev/zero of=/data/images/diskfulltest.img +/sbin/mkfs.ext2 -m 0 -F /data/images/diskfulltest.img +mkdir -p /data/db/diskfulltest +mount -o loop /data/images/diskfulltest.img /data/db/diskfulltest +*/ startPath = MongoRunner.dataDir + "/diskfulltest"; recoverPath = MongoRunner.dataDir + "/dur_diskfull"; @@ -52,7 +61,10 @@ function work() { var d = conn.getDB("test"); var big = new Array( 5000 ).toString(); var bulk = d.foo.initializeUnorderedBulkOp(); - for( i = 0; i < 10000; ++i ) { + // This part of the test depends on the partition size used in the build env + // Currently, unused, but with larger partitions insert enough documents here + // to create a second db file + for( i = 0; i < 1; ++i ) { bulk.insert({ _id: i, b: big }); } assert.writeOK(bulk.execute()); |