summaryrefslogtreecommitdiff
path: root/jstests/disk/quota3.js
blob: 0332667e53e992301084a20a7dd4fae16993617d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Test for quotaFiles being ignored allocating a large collection - SERVER-3511.

if (0) {  // SERVER-3511

    baseName = "jstests_disk_quota3";
    dbpath = MongoRunner.dataPath + baseName;

    var m = MongoRunner.runMongod({dbpath: dbpath, quotaFiles: 3, smallfiles: ""});
    db = m.getDB(baseName);

    db.createCollection(baseName, {size: 128 * 1024 * 1024});
    assert(db.getLastError());

    dotFourDataFile = dbpath + "/" + baseName + ".4";
    files = listFiles(dbpath);
    for (i in files) {
        // .3 file may be preallocated but not .4
        assert.neq(dotFourDataFile, files[i].name);
    }
}