summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod/geo_near_random2.js
blob: 2fafb7d4c80e4d0119fb80eb5e9d79f8daefe2c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// this tests 1% of all points using $near and $nearSphere
load("jstests/libs/geo_near_random.js");

var test = new GeoNearRandomTest("nightly.geo_near_random2");

test.insertPts(10000);

opts = {
    sphere: 0,
    nToTest: test.nPts * 0.01
};
test.testPt([0, 0], opts);
test.testPt(test.mkPt(), opts);
test.testPt(test.mkPt(), opts);
test.testPt(test.mkPt(), opts);
test.testPt(test.mkPt(), opts);

opts.sphere = 1;
test.testPt([0, 0], opts);
test.testPt(test.mkPt(0.8), opts);
test.testPt(test.mkPt(0.8), opts);
test.testPt(test.mkPt(0.8), opts);
test.testPt(test.mkPt(0.8), opts);