summaryrefslogtreecommitdiff
path: root/jstests/core/server14753.js
blob: cd6ea309399b6ac5687b9db12137ffa0e1eba947 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Validation test for SERVER-14753. Note that the issue under test is a memory leak, so this
// test would only be expected to fail when run under address sanitizer.

(function() {

    "use strict";
    var t = db.jstests_server14753;

    t.drop();
    t.ensureIndex({a: 1});
    t.ensureIndex({b: 1});
    for (var i = 0; i < 20; i++) {
        t.insert({b: i});
    }
    for (var i = 0; i < 20; i++) {
        t.find({b: 1}).sort({a: 1}).next();
    }

}());