summaryrefslogtreecommitdiff
path: root/jstests/ssl
diff options
context:
space:
mode:
authorMatthew Saltz <matthew.saltz@mongodb.com>2018-08-01 14:47:27 -0400
committerMatthew Saltz <matthew.saltz@mongodb.com>2018-08-09 14:04:28 -0400
commit25de1e85f2369d00391979f6efc5827d5e574e6f (patch)
tree868c49d8175b8abaec92875e682b0fbf8fb5aaa7 /jstests/ssl
parent16f62b01bf8098d761044ff71318d166e9a82dee (diff)
downloadmongo-25de1e85f2369d00391979f6efc5827d5e574e6f.tar.gz
SERVER-36392 Make tests that rely on the autosplitter unintentially not require the autosplitter
Diffstat (limited to 'jstests/ssl')
-rw-r--r--jstests/ssl/libs/ssl_helpers.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/jstests/ssl/libs/ssl_helpers.js b/jstests/ssl/libs/ssl_helpers.js
index 05d0a5b9333..6b5ed90d283 100644
--- a/jstests/ssl/libs/ssl_helpers.js
+++ b/jstests/ssl/libs/ssl_helpers.js
@@ -108,6 +108,12 @@ function mixedShardTest(options1, options2, shouldSucceed) {
try {
// Start ShardingTest with enableBalancer because ShardingTest attempts to turn
// off the balancer otherwise, which it will not be authorized to do if auth is enabled.
+ //
+ // Also, the autosplitter will be turned on automatically with 'enableBalancer: true'. We
+ // then want to disable the autosplitter, but cannot do so here with 'enableAutoSplit:
+ // false' because ShardingTest will attempt to call disableAutoSplit(), which it will not be
+ // authorized to do if auth is enabled.
+ //
// Once SERVER-14017 is fixed the "enableBalancer" line can be removed.
// TODO: Remove 'shardAsReplicaSet: false' when SERVER-32672 is fixed.
var st = new ShardingTest({
@@ -124,6 +130,7 @@ function mixedShardTest(options1, options2, shouldSucceed) {
authSucceeded = true;
st.stopBalancer();
+ st.disableAutoSplit();
// Test that $lookup works because it causes outgoing connections to be opened
testShardedLookup(st);
@@ -150,6 +157,9 @@ function mixedShardTest(options1, options2, shouldSucceed) {
assert.writeOK(bulk.execute());
assert.eq(128, db1.col.count(), "error retrieving documents from cluster");
+ // Split chunk to make it small enough to move
+ assert.commandWorked(st.splitFind("test.col", {_id: 0}));
+
// Test shards talking to each other
r = st.getDB('test').adminCommand(
{moveChunk: 'test.col', find: {_id: 0}, to: st.shard0.shardName});