summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2010-01-19 15:11:21 -0800
committerAaron <aaron@10gen.com>2010-01-19 15:11:21 -0800
commitce217513aa537b8c9696d365a6b464cd8ada3d9c (patch)
tree9f9295ab3ceafe0dd520e158fcefe2df4fd47ba4
parent3f4d6f7bf5f509c471883955227377ce2c6aa5d0 (diff)
downloadmongo-ce217513aa537b8c9696d365a6b464cd8ada3d9c.tar.gz
SERVER-493 file preallocation test
-rw-r--r--jstests/disk/preallocate.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/jstests/disk/preallocate.js b/jstests/disk/preallocate.js
new file mode 100644
index 00000000000..7ce3d40a412
--- /dev/null
+++ b/jstests/disk/preallocate.js
@@ -0,0 +1,19 @@
+var baseName = "jstests_preallocate";
+
+vsize = function() {
+ return m.getDB( "admin" ).runCommand( "serverStatus" ).mem.virtual;
+}
+
+var m = startMongod( "--port", "27018", "--dbpath", "/data/db/" + baseName );
+
+m.getDB( baseName ).createCollection( baseName + "1" );
+
+vs = vsize();
+
+stopMongod( 27018 );
+
+var m = startMongoProgram( "mongod", "--port", "27018", "--dbpath", "/data/db/" + baseName );
+
+m.getDB( baseName ).createCollection( baseName + "2" );
+
+assert.eq( vs, vsize() );