summaryrefslogtreecommitdiff
path: root/jstests/disk/newcollection1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/disk/newcollection1.js')
-rw-r--r--jstests/disk/newcollection1.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/jstests/disk/newcollection1.js b/jstests/disk/newcollection1.js
new file mode 100644
index 00000000000..e11e4a93a8a
--- /dev/null
+++ b/jstests/disk/newcollection1.js
@@ -0,0 +1,20 @@
+// SERVER-4560 test
+
+port = allocatePorts( 1 )[ 0 ]
+var baseName = "jstests_disk_newcollection1";
+var m = startMongod( "--noprealloc", "--smallfiles", "--port", port, "--dbpath", "/data/db/" + baseName );
+
+db = m.getDB( "test" );
+
+db.dropDatabase();
+
+var colls = db.getCollectionNames();
+
+assert ( colls.length==0 );
+
+db.createCollection("broken", {capped: true, size: -1});
+
+var new_colls = db.getCollectionNames();
+
+print (new_colls);
+assert( new_colls.length==0 );