summaryrefslogtreecommitdiff
path: root/jstests/core/temp_cleanup.js
blob: 200a82d2d1370bf9261c4f6a555f0d6cdda523aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// @tags: [
//   # mapReduce does not support afterClusterTime.
//   does_not_support_causal_consistency,
//   does_not_support_stepdowns,
//   requires_fastcount,
// ]

mydb = db.getSisterDB("temp_cleanup_test");

t = mydb.tempCleanup;
t.drop();

t.insert({x: 1});

res = t.mapReduce(
    function() {
        emit(1, 1);
    },
    function() {
        return 1;
    },
    "xyz");
printjson(res);

assert.eq(1, t.count(), "A1");
assert.eq(1, mydb[res.result].count(), "A2");

mydb.dropDatabase();