summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod/remove9.js
blob: b7da7b58f95e4c823931c272244cf343fbec968f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
t = db.jstests_remove9;
t.drop();

js =
    "while( 1 ) { for( i = 0; i < 10000; ++i ) { db.jstests_remove9.save( {i:i} ); } db.jstests_remove9.remove( {i: {$gte:0} } ); }";
pid = startMongoProgramNoConnect("mongo", "--eval", js, db ? db.getMongo().host : null);

Random.setRandomSeed();
for (var i = 0; i < 10000; ++i) {
    assert.writeOK(t.remove({i: Random.randInt(10000)}));
}

stopMongoProgramByPid(pid);