summaryrefslogtreecommitdiff
path: root/jstests/sharding/sharding_balance4.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/sharding_balance4.js')
-rw-r--r--jstests/sharding/sharding_balance4.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/sharding/sharding_balance4.js b/jstests/sharding/sharding_balance4.js
index e5c6e1056b5..75a30b62b9a 100644
--- a/jstests/sharding/sharding_balance4.js
+++ b/jstests/sharding/sharding_balance4.js
@@ -146,7 +146,8 @@
if (Math.random() > .999)
printjson(x);
- return Math.max(x.shard0000, x.shard0001) - Math.min(x.shard0000, x.shard0001);
+ return Math.max(x[s.shard0.shardName], x[s.shard1.shardName]) -
+ Math.min(x[s.shard0.shardName], x[s.shard1.shardName]);
}
assert.lt(20, diff1(), "initial load");