blob: 1417a54496cfd63295970b49e0924ceb98fd7ed2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// 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');
});
|