diff options
author | Randolph Tan <randolph@10gen.com> | 2012-05-14 10:05:51 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2012-05-22 10:50:53 -0400 |
commit | 4a9a294376f6d4d599244154e0b1e49d0172aed7 (patch) | |
tree | 604fd8bde8133970b2039b588a8548414c70690e /jstests/sharding/count1.js | |
parent | 13a9b34ae4ff54c29d2aac485168b6c6f4c77da9 (diff) | |
download | mongo-4a9a294376f6d4d599244154e0b1e49d0172aed7.tar.gz |
SERVER-5797 Uncaught exception in count_slaveok.js
Rewrote the count command in mongos to use ShardStrategy::commandOP and push handling of StaleConfigException to the caller.
Also modified ParallelSortClusteredCursor to handle SyncClusterConnection not allowing the call method to be used on commands.
Diffstat (limited to 'jstests/sharding/count1.js')
-rw-r--r-- | jstests/sharding/count1.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/jstests/sharding/count1.js b/jstests/sharding/count1.js index 2d133f887fc..cd46928ae2b 100644 --- a/jstests/sharding/count1.js +++ b/jstests/sharding/count1.js @@ -101,6 +101,11 @@ assert.eq( 2 , db.foo.find().limit(-2).itcount() , "N2" ); assert.eq( 2 , db.foo.find().skip(4).limit(2).itcount() , "N3" ); assert.eq( 2 , db.foo.find().skip(4).limit(-2).itcount() , "N4" ); +// Make sure count command returns error for invalid queries +var badCmdResult = db.runCommand({ count: 'foo', query: { $c: { $abc: 3 }}}); +assert( ! badCmdResult.ok ); +assert( badCmdResult.errmsg.length > 0 ); + s.stop(); |