summaryrefslogtreecommitdiff
path: root/jstests/sharding
diff options
context:
space:
mode:
authorJess Fan <jess.fan@10gen.com>2016-06-24 14:00:05 -0400
committerJess Fan <jess.fan@10gen.com>2016-07-06 09:56:21 -0400
commit504e52fea82aeec8995b3c5f3391dd54898d5970 (patch)
treea135a0e3a7f133af18b8ddf99dc656952d822b8f /jstests/sharding
parent05eca76c9df7df37cb422aa385cd4f121578b381 (diff)
downloadmongo-504e52fea82aeec8995b3c5f3391dd54898d5970.tar.gz
SERVER-24227 Replace autoSplit startup opt with proper setting
Diffstat (limited to 'jstests/sharding')
-rw-r--r--jstests/sharding/commands_that_write_accept_wc_configRS.js6
-rw-r--r--jstests/sharding/disable_autosplit.js4
-rw-r--r--jstests/sharding/move_chunk_wc.js4
-rw-r--r--jstests/sharding/sharding_options.js25
-rw-r--r--jstests/sharding/split_with_force.js2
-rw-r--r--jstests/sharding/split_with_force_small.js4
-rw-r--r--jstests/sharding/stale_mongos_updates_and_removes.js3
7 files changed, 12 insertions, 36 deletions
diff --git a/jstests/sharding/commands_that_write_accept_wc_configRS.js b/jstests/sharding/commands_that_write_accept_wc_configRS.js
index 4ae7071da82..213081c0f2a 100644
--- a/jstests/sharding/commands_that_write_accept_wc_configRS.js
+++ b/jstests/sharding/commands_that_write_accept_wc_configRS.js
@@ -19,9 +19,9 @@ load('jstests/multiVersion/libs/auth_helpers.js');
rs1: {nodes: 3, settings: {chainingAllowed: false}}
},
configReplSetTestOptions: {settings: {chainingAllowed: false}},
- mongos: 1,
- other: {mongosOptions: {noAutoSplit: ""}}
+ mongos: 1
});
+ st.disableAutoSplit();
var mongos = st.s;
var dbName = "wc-test-configRS";
@@ -284,4 +284,4 @@ load('jstests/multiVersion/libs/auth_helpers.js');
testMajorityWriteConcern(cmd);
});
-})(); \ No newline at end of file
+})();
diff --git a/jstests/sharding/disable_autosplit.js b/jstests/sharding/disable_autosplit.js
index db267cc28a0..d62d41e95f4 100644
--- a/jstests/sharding/disable_autosplit.js
+++ b/jstests/sharding/disable_autosplit.js
@@ -4,8 +4,8 @@
var chunkSizeMB = 1;
- var st = new ShardingTest(
- {shards: 1, mongos: 1, other: {chunkSize: chunkSizeMB, mongosOptions: {noAutoSplit: ""}}});
+ var st = new ShardingTest({shards: 1, mongos: 1, other: {chunkSize: chunkSizeMB}});
+ st.disableAutoSplit();
var data = "x";
while (data.length < chunkSizeMB * 1024 * 1024) {
diff --git a/jstests/sharding/move_chunk_wc.js b/jstests/sharding/move_chunk_wc.js
index 1ebf1be6b36..e94e9a01940 100644
--- a/jstests/sharding/move_chunk_wc.js
+++ b/jstests/sharding/move_chunk_wc.js
@@ -19,9 +19,9 @@ load('jstests/libs/write_concern_util.js');
},
mongos: 1,
config: 1,
- configReplSetTestOptions: {settings: {chainingAllowed: false}},
- other: {mongosOptions: {noAutoSplit: ""}}
+ configReplSetTestOptions: {settings: {chainingAllowed: false}}
});
+ st.disableAutoSplit();
var mongos = st.s;
var dbName = "move-chunk-wc-test";
diff --git a/jstests/sharding/sharding_options.js b/jstests/sharding/sharding_options.js
index 333b53e9cfd..8af7bf01c53 100644
--- a/jstests/sharding/sharding_options.js
+++ b/jstests/sharding/sharding_options.js
@@ -47,21 +47,6 @@ expectedResult = {
testGetCmdLineOptsMongod({config: "jstests/libs/config_files/set_shardingrole.json"},
expectedResult);
-// Auto Splitting
-jsTest.log("Testing \"noAutoSplit\" command line option");
-var expectedResult = {"parsed": {"sharding": {"autoSplit": false}}};
-testGetCmdLineOptsMongos({noAutoSplit: ""}, expectedResult);
-
-jsTest.log("Testing \"sharding.autoSplit\" config file option");
-expectedResult = {
- "parsed": {
- "config": "jstests/libs/config_files/enable_autosplit.json",
- "sharding": {"autoSplit": true}
- }
-};
-testGetCmdLineOptsMongos({config: "jstests/libs/config_files/enable_autosplit.json"},
- expectedResult);
-
// Test that we preserve switches explicitly set to false in config files. See SERVER-13439.
jsTest.log("Testing explicitly disabled \"moveParanoia\" config file option");
expectedResult = {
@@ -83,14 +68,4 @@ expectedResult = {
testGetCmdLineOptsMongod({config: "jstests/libs/config_files/disable_nomoveparanoia.ini"},
expectedResult);
-jsTest.log("Testing explicitly disabled \"noAutoSplit\" config file option");
-expectedResult = {
- "parsed": {
- "config": "jstests/libs/config_files/disable_noautosplit.ini",
- "sharding": {"autoSplit": true}
- }
-};
-testGetCmdLineOptsMongos({config: "jstests/libs/config_files/disable_noautosplit.ini"},
- expectedResult);
-
print(baseName + " succeeded.");
diff --git a/jstests/sharding/split_with_force.js b/jstests/sharding/split_with_force.js
index 35e25b5803e..c5bacd2dd28 100644
--- a/jstests/sharding/split_with_force.js
+++ b/jstests/sharding/split_with_force.js
@@ -4,10 +4,10 @@
var options = {
chunkSize: 1, // MB
- mongosOptions: {noAutoSplit: ""}
};
var st = new ShardingTest({shards: 1, mongos: 1, other: options});
+st.disableAutoSplit();
st.stopBalancer();
var mongos = st.s0;
diff --git a/jstests/sharding/split_with_force_small.js b/jstests/sharding/split_with_force_small.js
index be21049650e..ffc0e4d5bbd 100644
--- a/jstests/sharding/split_with_force_small.js
+++ b/jstests/sharding/split_with_force_small.js
@@ -4,8 +4,8 @@
(function() {
'use strict';
- var st = new ShardingTest(
- {shards: 1, mongos: 1, other: {chunkSize: 1, mongosOptions: {noAutoSplit: ""}}});
+ var st = new ShardingTest({shards: 1, mongos: 1, other: {chunkSize: 1}});
+ st.disableAutoSplit();
var mongos = st.s0;
var admin = mongos.getDB("admin");
diff --git a/jstests/sharding/stale_mongos_updates_and_removes.js b/jstests/sharding/stale_mongos_updates_and_removes.js
index 1bb93ef78fb..dc2fd701a78 100644
--- a/jstests/sharding/stale_mongos_updates_and_removes.js
+++ b/jstests/sharding/stale_mongos_updates_and_removes.js
@@ -171,7 +171,8 @@ var checkAllUpdateQueries = function(makeMongosStaleFunc) {
doUpdate(multiPointQuery, oUpdate, multi, makeMongosStaleFunc);
};
-var st = new ShardingTest({shards: 2, mongos: 2, other: {mongosOptions: {noAutoSplit: ""}}});
+var st = new ShardingTest({shards: 2, mongos: 2});
+st.disableAutoSplit();
var dbName = 'test';
var collNS = dbName + '.foo';
var numShardKeys = 10;