diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-01-06 18:41:07 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-01-07 15:04:37 -0500 |
commit | 47b931ab41098de23c967f0add30ef7b1a4bdda2 (patch) | |
tree | 098d0389f260f9e8a81f937940fe06fcd48c496b /jstests/core/create_collection_fail_cleanup.js | |
parent | 67c550459e416a9ec7eabe35e38c1fed9aeccb8f (diff) | |
download | mongo-47b931ab41098de23c967f0add30ef7b1a4bdda2.tar.gz |
SERVER-16711 Fix failing disk/diskfull.js suite
Diffstat (limited to 'jstests/core/create_collection_fail_cleanup.js')
-rw-r--r-- | jstests/core/create_collection_fail_cleanup.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/jstests/core/create_collection_fail_cleanup.js b/jstests/core/create_collection_fail_cleanup.js new file mode 100644 index 00000000000..a1548d35105 --- /dev/null +++ b/jstests/core/create_collection_fail_cleanup.js @@ -0,0 +1,16 @@ +// SERVER-4560 test + +var dbTest = db.getSisterDB("DB_create_collection_fail_cleanup"); +dbTest.dropDatabase(); + +assert(dbTest.getCollectionNames().length == 0); + +// This create collection call should fail. It would leave the database in created state though. +var res = dbTest.createCollection("broken", {capped: true, size: -1}); +assert.eq(false, res.ok); + +dbTest.getCollectionNames().forEach( + function(collName) { + print(collName); + assert(collName != 'broken'); + }); |