diff options
author | clang-format-7.0.1 <adam.martin@10gen.com> | 2019-07-26 18:20:35 -0400 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2019-07-27 11:02:23 -0400 |
commit | 134a4083953270e8a11430395357fb70a29047ad (patch) | |
tree | dd428e1230e31d92b20b393dfdc17ffe7fa79cb6 /jstests/sharding/error_propagation.js | |
parent | 1e46b5049003f427047e723ea5fab15b5a9253ca (diff) | |
download | mongo-134a4083953270e8a11430395357fb70a29047ad.tar.gz |
SERVER-41772 Apply clang-format 7.0.1 to the codebase
Diffstat (limited to 'jstests/sharding/error_propagation.js')
-rw-r--r-- | jstests/sharding/error_propagation.js | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/jstests/sharding/error_propagation.js b/jstests/sharding/error_propagation.js index 596534bf094..7fe4822e295 100644 --- a/jstests/sharding/error_propagation.js +++ b/jstests/sharding/error_propagation.js @@ -1,24 +1,24 @@ (function() { - // Tests that errors encountered on shards are correctly returned to the client when mongos uses - // the legacy DBClientCursor method of executing commands on shards. We use aggregation here - // specifically because it is one of the few query paths that still uses the legacy DBClient - // classes in mongos. - "use strict"; +// Tests that errors encountered on shards are correctly returned to the client when mongos uses +// the legacy DBClientCursor method of executing commands on shards. We use aggregation here +// specifically because it is one of the few query paths that still uses the legacy DBClient +// classes in mongos. +"use strict"; - var st = new ShardingTest({mongos: 1, shards: 1, rs: {nodes: 3}}); +var st = new ShardingTest({mongos: 1, shards: 1, rs: {nodes: 3}}); - var db = st.getDB('test'); - db.setSlaveOk(true); +var db = st.getDB('test'); +db.setSlaveOk(true); - assert.writeOK(db.foo.insert({a: 1}, {writeConcern: {w: 3}})); - assert.commandWorked(db.runCommand( - {aggregate: 'foo', pipeline: [{$project: {total: {'$add': ['$a', 1]}}}], cursor: {}})); +assert.writeOK(db.foo.insert({a: 1}, {writeConcern: {w: 3}})); +assert.commandWorked(db.runCommand( + {aggregate: 'foo', pipeline: [{$project: {total: {'$add': ['$a', 1]}}}], cursor: {}})); - assert.writeOK(db.foo.insert({a: [1, 2]}, {writeConcern: {w: 3}})); +assert.writeOK(db.foo.insert({a: [1, 2]}, {writeConcern: {w: 3}})); - var res = db.runCommand( - {aggregate: 'foo', pipeline: [{$project: {total: {'$add': ['$a', 1]}}}], cursor: {}}); - assert.commandFailed(res); - assert.eq("$add only supports numeric or date types, not array", res.errmsg, printjson(res)); - st.stop(); +var res = db.runCommand( + {aggregate: 'foo', pipeline: [{$project: {total: {'$add': ['$a', 1]}}}], cursor: {}}); +assert.commandFailed(res); +assert.eq("$add only supports numeric or date types, not array", res.errmsg, printjson(res)); +st.stop(); }()); |