summaryrefslogtreecommitdiff
path: root/jstests/gle/gle_sharded_write.js
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2014-05-02 14:37:31 -0400
committerSiyuan Zhou <siyuan.zhou@mongodb.com>2014-05-06 13:03:17 -0400
commit688b0585cb2cc0cdeffb019f88643b2340c55d17 (patch)
tree1d3e8910a85b9a1d1314e233468dcdef7b65e8b3 /jstests/gle/gle_sharded_write.js
parent9bfb22bb2a3467852cfa688b41b03267a81b7ef3 (diff)
downloadmongo-688b0585cb2cc0cdeffb019f88643b2340c55d17.tar.gz
SERVER-13812 Add test case of GLE for unsupported
Diffstat (limited to 'jstests/gle/gle_sharded_write.js')
-rw-r--r--jstests/gle/gle_sharded_write.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/jstests/gle/gle_sharded_write.js b/jstests/gle/gle_sharded_write.js
index 0f602a5e4d7..e34946ed1af 100644
--- a/jstests/gle/gle_sharded_write.js
+++ b/jstests/gle/gle_sharded_write.js
@@ -144,6 +144,30 @@ assert(gle.singleShard);
assert.eq(coll.count(), 0);
//
+// Geo $near is not supported on mongos
+coll.ensureIndex( { loc: "2dsphere" } );
+coll.remove({});
+var query = {
+ loc : {
+ $near : {
+ $geometry : {
+ type : "Point" ,
+ coordinates : [ 0 , 0 ]
+ },
+ $maxDistance : 1000,
+ }
+ }
+}
+printjson(coll.remove(query));
+printjson(gle = coll.getDB().runCommand({ getLastError : 1 }));
+assert(gle.ok);
+assert(gle.err);
+assert(gle.code);
+assert(!gle.errmsg);
+assert(gle.shards);
+assert.eq(coll.count(), 0);
+
+//
// First shard down
//