diff options
Diffstat (limited to 'jstests/disk/preallocate2.js')
-rw-r--r-- | jstests/disk/preallocate2.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/jstests/disk/preallocate2.js b/jstests/disk/preallocate2.js new file mode 100644 index 00000000000..ee9382cfe8d --- /dev/null +++ b/jstests/disk/preallocate2.js @@ -0,0 +1,11 @@ +// check that there is preallocation on insert + +port = allocatePorts( 1 )[ 0 ]; + +var baseName = "jstests_preallocate2"; + +var m = startMongod( "--port", port, "--dbpath", "/data/db/" + baseName ); + +m.getDB( baseName )[ baseName ].save( {i:1} ); + +assert.soon( function() { return m.getDBs().totalSize > 100000000; }, "expected second file to bring total size over 100MB" );
\ No newline at end of file |