summaryrefslogtreecommitdiff
path: root/jstests/disk
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2010-02-08 18:21:42 -0800
committerAaron <aaron@10gen.com>2010-02-08 18:21:42 -0800
commita01100d8e55d14dc78b111d8516f644583b80de5 (patch)
tree351cadd65427d3391aeea0546fe7d6a3d0c48046 /jstests/disk
parent04ef27cb4f32c5f17f70d19ca003ce72c0d5e35b (diff)
downloadmongo-a01100d8e55d14dc78b111d8516f644583b80de5.tar.gz
SERVER-594 allocate first extent of new collection from free list
Diffstat (limited to 'jstests/disk')
-rw-r--r--jstests/disk/newcollection.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/jstests/disk/newcollection.js b/jstests/disk/newcollection.js
new file mode 100644
index 00000000000..944ad1c8679
--- /dev/null
+++ b/jstests/disk/newcollection.js
@@ -0,0 +1,13 @@
+// SERVER-594 test
+
+port = allocatePorts( 1 )[ 0 ]
+var baseName = "jstests_disk_newcollection";
+var m = startMongod( "--noprealloc", "--smallfiles", "--port", port, "--dbpath", "/data/db/" + baseName );
+db = m.getDB( "test" );
+
+db.createCollection( baseName, {size:15.9*1024*1024} );
+db.baseName.drop();
+
+size = m.getDBs().totalSize;
+db.baseName.save( {} );
+assert.eq( size, m.getDBs().totalSize );