summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2017-01-26 11:49:55 -0500
committerJonathan Abrahams <jonathan@mongodb.com>2017-08-10 12:57:16 -0400
commit54ce75ef7074fefe343114e2855426271f1f418e (patch)
tree9450e7d666730e61cb37ed03ab23149afd5812cc
parent271cf7c28c00ffb15442fab3e5b49edef5797b9b (diff)
downloadmongo-54ce75ef7074fefe343114e2855426271f1f418e.tar.gz
SERVER-26824 Skip FSM workloads which rely on nUpserted or nRemoved when Balancer is enabled
(cherry picked from commit eab4cda3dc8b677624d0a464d55b76a052daebdd)
-rw-r--r--jstests/concurrency/fsm_workloads/remove_multiple_documents.js11
-rw-r--r--jstests/concurrency/fsm_workloads/remove_where.js9
2 files changed, 19 insertions, 1 deletions
diff --git a/jstests/concurrency/fsm_workloads/remove_multiple_documents.js b/jstests/concurrency/fsm_workloads/remove_multiple_documents.js
index bfd64cd6790..1461ca0cc03 100644
--- a/jstests/concurrency/fsm_workloads/remove_multiple_documents.js
+++ b/jstests/concurrency/fsm_workloads/remove_multiple_documents.js
@@ -34,8 +34,17 @@ var $config = (function() {
}
};
+ var skip = function skip(cluster) {
+ // When the balancer is enabled, the nRemoved result may be inaccurate as
+ // a chunk migration may be active, causing the count function to assert.
+ if (cluster.isBalancerEnabled()) {
+ return {skip: true, msg: 'does not run when balancer is enabled.'};
+ }
+ return {skip: false};
+ };
+
var transitions = {init: {count: 1}, count: {remove: 1}, remove: {remove: 0.825, count: 0.125}};
- return {threadCount: 10, iterations: 20, states: states, transitions: transitions};
+ return {threadCount: 10, iterations: 20, states: states, transitions: transitions, skip: skip};
})();
diff --git a/jstests/concurrency/fsm_workloads/remove_where.js b/jstests/concurrency/fsm_workloads/remove_where.js
index f9c0e6a2c03..3ef214c769b 100644
--- a/jstests/concurrency/fsm_workloads/remove_where.js
+++ b/jstests/concurrency/fsm_workloads/remove_where.js
@@ -38,5 +38,14 @@ var $config = extendWorkload($config, function($config, $super) {
/* no-op to prevent index from being created */
};
+ $config.skip = function skip(cluster) {
+ // When the balancer is enabled, the nRemoved result may be inaccurate as
+ // a chunk migration may be active, causing the count function to assert.
+ if (cluster.isBalancerEnabled()) {
+ return {skip: true, msg: 'does not run when balancer is enabled.'};
+ }
+ return {skip: false};
+ };
+
return $config;
});