diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-07-27 00:57:38 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-07-27 00:57:38 -0400 |
commit | 6e7c9d6836a74ee5fb66ba4aff008726a45985a9 (patch) | |
tree | c1ffc8c13bb13805018e59def5c196a39aa4baeb /jstests/sharding/features2.js | |
parent | 80f6c1ec51fbb7468c2b0ffc4594add641a8ab23 (diff) | |
download | mongo-6e7c9d6836a74ee5fb66ba4aff008726a45985a9.tar.gz |
make sure mongod and mongos report command errors the same way SERVER-1472
Diffstat (limited to 'jstests/sharding/features2.js')
-rw-r--r-- | jstests/sharding/features2.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/jstests/sharding/features2.js b/jstests/sharding/features2.js index f9e2614619f..dfb28834443 100644 --- a/jstests/sharding/features2.js +++ b/jstests/sharding/features2.js @@ -124,6 +124,14 @@ s.adminCommand({movechunk:'test.mr', find:{x:3}, to: s.getServer('test').name } doMR( "after extra split" ); +cmd = { mapreduce : "mr" , map : "emit( " , reduce : "fooz + " }; + +x = db.runCommand( cmd ); +y = s._connections[0].getDB( "test" ).runCommand( cmd ); + +printjson( x ) +printjson( y ) + // count db.countaa.save({"regex" : /foo/i}) @@ -132,5 +140,20 @@ db.countaa.save({"regex" : /foo/i}) assert.eq( 3 , db.countaa.count() , "counta1" ); assert.eq( 3 , db.countaa.find().itcount() , "counta1" ); +x = null; y = null; +try { + x = db.runCommand( "forceerror" ) +} +catch ( e ){ + x = e; +} +try { + y = s._connections[0].getDB( "test" ).runCommand( "forceerror" ); +} +catch ( e ){ + y = e; +} + +assert.eq( x , y , "assert format" ) s.stop(); |