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/advance_logical_time_with_valid_signature.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/advance_logical_time_with_valid_signature.js')
-rw-r--r-- | jstests/sharding/advance_logical_time_with_valid_signature.js | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/jstests/sharding/advance_logical_time_with_valid_signature.js b/jstests/sharding/advance_logical_time_with_valid_signature.js index bc9f8d86353..fccd047f6fd 100644 --- a/jstests/sharding/advance_logical_time_with_valid_signature.js +++ b/jstests/sharding/advance_logical_time_with_valid_signature.js @@ -3,42 +3,42 @@ * cluster time. */ (function() { - "use strict"; +"use strict"; - // Setup 2 mongos processes with mongobridge. - let st = new ShardingTest({shards: 1, mongos: 2, useBridge: true}); +// Setup 2 mongos processes with mongobridge. +let st = new ShardingTest({shards: 1, mongos: 2, useBridge: true}); - // Sever outgoing communications from the second mongos. - st.s0.disconnect(st.s1); - st._configServers.forEach(function(configSvr) { - configSvr.disconnect(st.s1); - }); +// Sever outgoing communications from the second mongos. +st.s0.disconnect(st.s1); +st._configServers.forEach(function(configSvr) { + configSvr.disconnect(st.s1); +}); - st._rsObjects.forEach(function(rsNodes) { - rsNodes.nodes.forEach(function(conn) { - conn.disconnect(st.s1); - }); +st._rsObjects.forEach(function(rsNodes) { + rsNodes.nodes.forEach(function(conn) { + conn.disconnect(st.s1); }); +}); - let connectedDB = st.s0.getDB("test"); - let disconnectedDB = st.s1.getDB("test"); +let connectedDB = st.s0.getDB("test"); +let disconnectedDB = st.s1.getDB("test"); - // Send an insert to the connected mongos to advance its cluster time. - let res = assert.commandWorked(connectedDB.runCommand({insert: "foo", documents: [{x: 1}]})); +// Send an insert to the connected mongos to advance its cluster time. +let res = assert.commandWorked(connectedDB.runCommand({insert: "foo", documents: [{x: 1}]})); - // Get logicalTime metadata from the connected mongos's response and send it in an isMaster - // command to the disconnected mongos. isMaster does not require mongos to contact any other - // servers, so the command should succeed. - let lt = res.$clusterTime; - res = assert.commandWorked( - disconnectedDB.runCommand({isMaster: 1, $clusterTime: lt}), - "expected the disconnected mongos to accept cluster time: " + tojson(lt)); +// Get logicalTime metadata from the connected mongos's response and send it in an isMaster +// command to the disconnected mongos. isMaster does not require mongos to contact any other +// servers, so the command should succeed. +let lt = res.$clusterTime; +res = + assert.commandWorked(disconnectedDB.runCommand({isMaster: 1, $clusterTime: lt}), + "expected the disconnected mongos to accept cluster time: " + tojson(lt)); - // Verify cluster time response from the disconnected mongos matches what was passed. - assert.eq(lt, - res.$clusterTime, - "expected the disconnected mongos to send cluster time: " + tojson(lt) + - ", received: " + tojson(res.$clusterTime)); +// Verify cluster time response from the disconnected mongos matches what was passed. +assert.eq(lt, + res.$clusterTime, + "expected the disconnected mongos to send cluster time: " + tojson(lt) + + ", received: " + tojson(res.$clusterTime)); - st.stop(); +st.stop(); })(); |