diff options
author | Jonathan Abrahams <jonathan@mongodb.com> | 2016-03-09 12:17:50 -0500 |
---|---|---|
committer | Jonathan Abrahams <jonathan@mongodb.com> | 2016-03-09 12:18:14 -0500 |
commit | 4ae691e8edc87d0e3cfb633bb91c328426be007b (patch) | |
tree | 52079a593f54382ca13a2e741633eab1b6271893 /jstests/concurrency/fsm_libs/composer.js | |
parent | a025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff) | |
download | mongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz |
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/concurrency/fsm_libs/composer.js')
-rw-r--r-- | jstests/concurrency/fsm_libs/composer.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/jstests/concurrency/fsm_libs/composer.js b/jstests/concurrency/fsm_libs/composer.js index d0552f45fd0..495648fb01a 100644 --- a/jstests/concurrency/fsm_libs/composer.js +++ b/jstests/concurrency/fsm_libs/composer.js @@ -6,8 +6,8 @@ var composer = (function() { // TODO: what if a workload depends on iterations? var iterations = 100; - assert.eq(AssertLevel.ALWAYS, globalAssertLevel, - 'global assertion level is not set as ALWAYS'); + assert.eq( + AssertLevel.ALWAYS, globalAssertLevel, 'global assertion level is not set as ALWAYS'); var currentWorkload = getRandomElem(workloads, Random.rand()); var currentState = configs[currentWorkload].startState; @@ -18,8 +18,7 @@ var composer = (function() { var args = configs[workload]; if (!first) { assert.eq(myDB, args.db, 'expected all workloads to use same database'); - assert.eq(collName, args.collName, - 'expected all workloads to use same collection'); + assert.eq(collName, args.collName, 'expected all workloads to use same collection'); } myDB = args.db; collName = args.collName; @@ -38,8 +37,8 @@ var composer = (function() { // Transition to another valid state of the current workload, // with probability '1 - mixProb' if (Random.rand() >= mixProb) { - var nextState = fsm._getWeightedRandomChoice(args.transitions[currentState], - Random.rand()); + var nextState = + fsm._getWeightedRandomChoice(args.transitions[currentState], Random.rand()); currentState = nextState; continue; } @@ -52,11 +51,12 @@ var composer = (function() { } var args = configs[workload]; - Object.keys(args.states).forEach(function(state) { - if (state !== args.startState) { - otherStates.push({ workload: workload, state: state }); - } - }); + Object.keys(args.states) + .forEach(function(state) { + if (state !== args.startState) { + otherStates.push({workload: workload, state: state}); + } + }); }); var next = getRandomElem(otherStates, Random.rand()); |