diff options
Diffstat (limited to 'jstests/concurrency/fsm_workloads/remove_single_document.js')
-rw-r--r-- | jstests/concurrency/fsm_workloads/remove_single_document.js | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/jstests/concurrency/fsm_workloads/remove_single_document.js b/jstests/concurrency/fsm_workloads/remove_single_document.js index 75442919f2d..5f83e0f57f8 100644 --- a/jstests/concurrency/fsm_workloads/remove_single_document.js +++ b/jstests/concurrency/fsm_workloads/remove_single_document.js @@ -10,19 +10,13 @@ var $config = (function() { var states = { remove: function remove(db, collName) { // try removing a random document - var res = this.doRemove(db, - collName, - { rand: { $gte: Random.rand() } }, - { justOne: true }); + var res = this.doRemove(db, collName, {rand: {$gte: Random.rand()}}, {justOne: true}); assertAlways.lte(res.nRemoved, 1); if (res.nRemoved === 0) { // The above remove() can fail to remove a document when the random value // in the query is greater than any of the random values in the collection. // When that situation occurs, just remove an arbitrary document instead. - res = this.doRemove(db, - collName, - {}, - { justOne: true }); + res = this.doRemove(db, collName, {}, {justOne: true}); assertAlways.lte(res.nRemoved, 1); } this.assertResult(res); @@ -30,14 +24,14 @@ var $config = (function() { }; var transitions = { - remove: { remove: 1 } + remove: {remove: 1} }; function setup(db, collName, cluster) { // insert enough documents so that each thread can remove exactly one per iteration var num = this.threadCount * this.iterations; for (var i = 0; i < num; ++i) { - db[collName].insert({ i: i, rand: Random.rand() }); + db[collName].insert({i: i, rand: Random.rand()}); } assertWhenOwnColl.eq(db[collName].find().itcount(), num); } |