0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-13812 Add test case of GLE for unsupported

This commit is contained in:
Siyuan Zhou 2014-05-02 14:37:31 -04:00
parent 9bfb22bb2a
commit 688b0585cb

View File

@ -143,6 +143,30 @@ assert(!gle.errmsg);
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
//