summaryrefslogtreecommitdiff
path: root/jstests/sharding/migrateBig_balancer.js
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2016-09-30 13:23:55 -0400
committerSpencer T Brody <spencer@mongodb.com>2016-09-30 14:00:43 -0400
commitba344084775139e211e6d8904a2282c1cec1ad83 (patch)
tree80e67401eb7eafa74d7dc2aa88c2b4244b19a5e7 /jstests/sharding/migrateBig_balancer.js
parent1ac511f1673d9663454651c2763aec32387c077f (diff)
downloadmongo-ba344084775139e211e6d8904a2282c1cec1ad83.tar.gz
SERVER-26414 Don't preemptively abort test due to perceived machine slowness in migrateBig_balancer.js
Diffstat (limited to 'jstests/sharding/migrateBig_balancer.js')
-rw-r--r--jstests/sharding/migrateBig_balancer.js20
1 files changed, 4 insertions, 16 deletions
diff --git a/jstests/sharding/migrateBig_balancer.js b/jstests/sharding/migrateBig_balancer.js
index cd44a225a62..9eb50c2168e 100644
--- a/jstests/sharding/migrateBig_balancer.js
+++ b/jstests/sharding/migrateBig_balancer.js
@@ -1,11 +1,12 @@
(function() {
+ "use strict";
var st =
new ShardingTest({name: 'migrateBig_balancer', shards: 2, other: {enableBalancer: true}});
var mongos = st.s;
var admin = mongos.getDB("admin");
- db = mongos.getDB("test");
+ var db = mongos.getDB("test");
var coll = db.getCollection("stuff");
assert.commandWorked(admin.runCommand({enablesharding: coll.getDB().getName()}));
@@ -18,7 +19,7 @@
for (var i = 0; i < nsq; i++)
data += data;
- dataObj = {};
+ var dataObj = {};
for (var i = 0; i < n; i++)
dataObj["data-" + i] = data;
@@ -40,20 +41,7 @@
5, mongos.getDB("config").chunks.find({ns: "test.stuff"}).count(), "not enough chunks");
assert.soon(function() {
- // On *extremely* slow or variable systems, we've seen migrations fail in the critical
- // section and
- // kill the server. Do an explicit check for this. SERVER-8781
- // TODO: Remove once we can better specify what systems to run what tests on.
- try {
- assert.commandWorked(st.shard0.getDB("admin").runCommand({ping: 1}));
- assert.commandWorked(st.shard1.getDB("admin").runCommand({ping: 1}));
- } catch (e) {
- print("An error occurred contacting a shard during balancing," +
- " this may be due to slow disk I/O, aborting test.");
- throw e;
- }
-
- res = mongos.getDB("config").chunks.group({
+ var res = mongos.getDB("config").chunks.group({
cond: {ns: "test.stuff"},
key: {shard: 1},
reduce: function(doc, out) {