summaryrefslogtreecommitdiff
path: root/jstests/concurrency/fsm_libs/composer.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/concurrency/fsm_libs/composer.js')
-rw-r--r--jstests/concurrency/fsm_libs/composer.js22
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());