From 6dcdd23dd37ef12c87e71cf59ef01cd82432efe0 Mon Sep 17 00:00:00 2001 From: Mark Benvenuto Date: Sat, 28 May 2016 17:55:12 -0400 Subject: SERVER-23971 Clang-Format code --- jstests/sharding/explain_read_pref.js | 46 +++++++++++++++-------------------- 1 file changed, 20 insertions(+), 26 deletions(-) (limited to 'jstests/sharding/explain_read_pref.js') diff --git a/jstests/sharding/explain_read_pref.js b/jstests/sharding/explain_read_pref.js index cdf1d1e74a4..8ac4fc4ff49 100644 --- a/jstests/sharding/explain_read_pref.js +++ b/jstests/sharding/explain_read_pref.js @@ -32,28 +32,28 @@ var testAllModes = function(conn, isMongos) { // { tag: 'two' } so we can test the interaction of modes and tags. Test // a bunch of combinations. [ - // mode, tagSets, expectedHost - ['primary', undefined, false], - ['primary', [{}], false], + // mode, tagSets, expectedHost + ['primary', undefined, false], + ['primary', [{}], false], - ['primaryPreferred', undefined, false], - ['primaryPreferred', [{tag: 'one'}], false], - // Correctly uses primary and ignores the tag - ['primaryPreferred', [{tag: 'two'}], false], + ['primaryPreferred', undefined, false], + ['primaryPreferred', [{tag: 'one'}], false], + // Correctly uses primary and ignores the tag + ['primaryPreferred', [{tag: 'two'}], false], - ['secondary', undefined, true], - ['secondary', [{tag: 'two'}], true], - ['secondary', [{tag: 'doesntexist'}, {}], true], - ['secondary', [{tag: 'doesntexist'}, {tag: 'two'}], true], + ['secondary', undefined, true], + ['secondary', [{tag: 'two'}], true], + ['secondary', [{tag: 'doesntexist'}, {}], true], + ['secondary', [{tag: 'doesntexist'}, {tag: 'two'}], true], - ['secondaryPreferred', undefined, true], - ['secondaryPreferred', [{tag: 'one'}], false], - ['secondaryPreferred', [{tag: 'two'}], true], + ['secondaryPreferred', undefined, true], + ['secondaryPreferred', [{tag: 'one'}], false], + ['secondaryPreferred', [{tag: 'two'}], true], - // We don't have a way to alter ping times so we can't predict where an - // untagged 'nearest' command should go, hence only test with tags. - ['nearest', [{tag: 'one'}], false], - ['nearest', [{tag: 'two'}], true] + // We don't have a way to alter ping times so we can't predict where an + // untagged 'nearest' command should go, hence only test with tags. + ['nearest', [{tag: 'one'}], false], + ['nearest', [{tag: 'two'}], true] ].forEach(function(args) { var mode = args[0], tagSets = args[1], secExpected = args[2]; @@ -101,14 +101,8 @@ ReplSetTest.awaitRSClientHosts(st.s, st.rs0.nodes); // Tag primary with { dc: 'ny', tag: 'one' }, secondary with { dc: 'ny', tag: 'two' } var primary = st.rs0.getPrimary(); var secondary = st.rs0.getSecondary(); -var PRIMARY_TAG = { - dc: 'ny', - tag: 'one' -}; -var SECONDARY_TAG = { - dc: 'ny', - tag: 'two' -}; +var PRIMARY_TAG = {dc: 'ny', tag: 'one'}; +var SECONDARY_TAG = {dc: 'ny', tag: 'two'}; var rsConfig = primary.getDB("local").system.replset.findOne(); jsTest.log('got rsconf ' + tojson(rsConfig)); -- cgit v1.2.1