summaryrefslogtreecommitdiff
path: root/jstests/geo_uniqueDocs.js
diff options
context:
space:
mode:
authorScott Hernandez <scotthernandez@gmail.com>2014-03-25 15:29:54 -0400
committerScott Hernandez <scotthernandez@gmail.com>2014-03-25 18:34:49 -0400
commit57f97f213346b7a0305c81fd70894a77ca35a886 (patch)
tree2298ebe1b7cb4a6faaa7e2e06ccd9a098b661acf /jstests/geo_uniqueDocs.js
parente73399e0e696aaaf1e859533e10cc2b74d46994f (diff)
downloadmongo-57f97f213346b7a0305c81fd70894a77ca35a886.tar.gz
SERVER-13297: remove dead jstests
Diffstat (limited to 'jstests/geo_uniqueDocs.js')
-rw-r--r--jstests/geo_uniqueDocs.js40
1 files changed, 0 insertions, 40 deletions
diff --git a/jstests/geo_uniqueDocs.js b/jstests/geo_uniqueDocs.js
deleted file mode 100644
index 61f1a40522d..00000000000
--- a/jstests/geo_uniqueDocs.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// Test uniqueDocs option for $within and geoNear queries SERVER-3139
-// SERVER-12120 uniqueDocs is deprecated. Server always returns unique documents.
-
-collName = 'geo_uniqueDocs_test'
-t = db.geo_uniqueDocs_test
-t.drop()
-
-t.save( { locs : [ [0,2], [3,4]] } )
-t.save( { locs : [ [6,8], [10,10] ] } )
-
-t.ensureIndex( { locs : '2d' } )
-
-// geoNear tests
-// uniqueDocs option is ignored.
-assert.eq(2, db.runCommand({geoNear:collName, near:[0,0]}).results.length)
-assert.eq(2, db.runCommand({geoNear:collName, near:[0,0], uniqueDocs:false}).results.length)
-assert.eq(2, db.runCommand({geoNear:collName, near:[0,0], uniqueDocs:true}).results.length)
-results = db.runCommand({geoNear:collName, near:[0,0], num:2}).results
-assert.eq(2, results.length)
-assert.close(2, results[0].dis)
-assert.close(10, results[1].dis)
-results = db.runCommand({geoNear:collName, near:[0,0], num:2, uniqueDocs:true}).results
-assert.eq(2, results.length)
-assert.close(2, results[0].dis)
-assert.close(10, results[1].dis)
-
-// $within tests
-
-assert.eq(2, t.find( {locs: {$within: {$box : [[0,0],[9,9]]}}}).itcount())
-assert.eq(2, t.find( {locs: {$within: {$box : [[0,0],[9,9]], $uniqueDocs : true}}}).itcount())
-assert.eq(2, t.find( {locs: {$within: {$box : [[0,0],[9,9]], $uniqueDocs : false}}}).itcount())
-
-assert.eq(2, t.find( {locs: {$within: {$center : [[5,5],7], $uniqueDocs : true}}}).itcount())
-assert.eq(2, t.find( {locs: {$within: {$center : [[5,5],7], $uniqueDocs : false}}}).itcount())
-
-assert.eq(2, t.find( {locs: {$within: {$centerSphere : [[5,5],1], $uniqueDocs : true}}}).itcount())
-assert.eq(2, t.find( {locs: {$within: {$centerSphere : [[5,5],1], $uniqueDocs : false}}}).itcount())
-
-assert.eq(2, t.find( {locs: {$within: {$polygon : [[0,0],[0,9],[9,9]], $uniqueDocs : true}}}).itcount())
-assert.eq(2, t.find( {locs: {$within: {$polygon : [[0,0],[0,9],[9,9]], $uniqueDocs : false}}}).itcount())