diff options
author | Esha Maharishi <esha.maharishi@mongodb.com> | 2016-09-30 11:06:53 -0400 |
---|---|---|
committer | Esha Maharishi <esha.maharishi@mongodb.com> | 2016-09-30 17:54:39 -0400 |
commit | 99c905a87a620d50d2bad4659978325032372258 (patch) | |
tree | a91fd459ff9ee5cf169efd51790aa089e9c05a84 /jstests/sharding | |
parent | cabfdfe829943440a5307335f2ebc0fc1286aa2d (diff) | |
download | mongo-99c905a87a620d50d2bad4659978325032372258.tar.gz |
SERVER-26309 for renamed tests, change test name in blacklists to match
Diffstat (limited to 'jstests/sharding')
22 files changed, 49 insertions, 38 deletions
diff --git a/jstests/sharding/auth.js b/jstests/sharding/auth.js index 03a3068008c..44cef91233b 100644 --- a/jstests/sharding/auth.js +++ b/jstests/sharding/auth.js @@ -37,7 +37,7 @@ name: "auth", mongos: 1, shards: 0, - other: {keyFile: "jstests/libs/key1", chunkSize: 1}, + other: {keyFile: "jstests/libs/key1", chunkSize: 1, enableAutoSplit: true}, }); if (s.getDB('admin').runCommand('buildInfo').bits < 64) { diff --git a/jstests/sharding/authCommands.js b/jstests/sharding/authCommands.js index ba015c556af..4dd36172d85 100644 --- a/jstests/sharding/authCommands.js +++ b/jstests/sharding/authCommands.js @@ -7,11 +7,8 @@ var st = new ShardingTest({ shards: 2, rs: {oplogSize: 10, useHostname: false}, - other: { - keyFile: 'jstests/libs/key1', - useHostname: false, - chunkSize: 2, - }, + other: + {keyFile: 'jstests/libs/key1', useHostname: false, chunkSize: 2, enableAutoSplit: true}, }); var mongos = st.s; diff --git a/jstests/sharding/auto1.js b/jstests/sharding/autosplit.js index 8c5e4510b9b..bb34021487f 100644 --- a/jstests/sharding/auto1.js +++ b/jstests/sharding/autosplit.js @@ -4,7 +4,7 @@ (function() { 'use strict'; - var s = new ShardingTest({name: "auto1", shards: 2, mongos: 1}); + var s = new ShardingTest({name: "auto1", shards: 2, mongos: 1, other: {enableAutoSplit: true}}); assert.commandWorked(s.s0.adminCommand({enablesharding: "test"})); s.ensurePrimaryShard('test', 'shard0001'); diff --git a/jstests/sharding/autosplit_heuristics.js b/jstests/sharding/autosplit_heuristics.js index bfde45cfc67..659f74725b0 100644 --- a/jstests/sharding/autosplit_heuristics.js +++ b/jstests/sharding/autosplit_heuristics.js @@ -5,7 +5,7 @@ (function() { 'use strict'; - var st = new ShardingTest({shards: 1, mongos: 1, other: {chunkSize: 1}}); + var st = new ShardingTest({shards: 1, mongos: 1, other: {chunkSize: 1, enableAutoSplit: true}}); // The balancer is by default stopped, thus it will NOT interfere unpredictably with the chunk // moves/splits depending on the timing. diff --git a/jstests/sharding/auto2.js b/jstests/sharding/autosplit_with_balancer.js index f3d8bf299ec..f1853211e4c 100644 --- a/jstests/sharding/auto2.js +++ b/jstests/sharding/autosplit_with_balancer.js @@ -1,6 +1,6 @@ (function() { - var s = new ShardingTest({name: "auto2", shards: 2, mongos: 2}); + var s = new ShardingTest({name: "auto2", shards: 2, mongos: 2, other: {enableAutoSplit: true}}); s.adminCommand({enablesharding: "test"}); s.ensurePrimaryShard('test', 'shard0001'); diff --git a/jstests/sharding/commands_that_write_accept_wc_configRS.js b/jstests/sharding/commands_that_write_accept_wc_configRS.js index 213081c0f2a..4a983a0b7b7 100644 --- a/jstests/sharding/commands_that_write_accept_wc_configRS.js +++ b/jstests/sharding/commands_that_write_accept_wc_configRS.js @@ -21,7 +21,6 @@ load('jstests/multiVersion/libs/auth_helpers.js'); configReplSetTestOptions: {settings: {chainingAllowed: false}}, mongos: 1 }); - st.disableAutoSplit(); var mongos = st.s; var dbName = "wc-test-configRS"; diff --git a/jstests/sharding/conf_server_write_concern_metadata.js b/jstests/sharding/conf_server_write_concern_metadata.js index 8f2a0063ac7..dd15c5cb179 100644 --- a/jstests/sharding/conf_server_write_concern_metadata.js +++ b/jstests/sharding/conf_server_write_concern_metadata.js @@ -1,11 +1,11 @@ /** * Test write concern with w parameter will not cause an error when writes to mongos would trigger - * writes to config servers (in this test, split chunks is used). + * writes to config servers (in this test, autosplit is used). */ (function() { 'use strict'; - var st = new ShardingTest({shards: 1, rs: true, other: {chunkSize: 1}}); + var st = new ShardingTest({shards: 1, rs: true, other: {chunkSize: 1, enableAutoSplit: true}}); var mongos = st.s; var testDB = mongos.getDB('test'); diff --git a/jstests/sharding/cursor1.js b/jstests/sharding/cursor1.js index de39f04841f..0644aee1dca 100644 --- a/jstests/sharding/cursor1.js +++ b/jstests/sharding/cursor1.js @@ -4,9 +4,6 @@ var s = new ShardingTest({name: "sharding_cursor1", shards: 2}); - // This test handles chunk splitting manually. - s.disableAutoSplit(); - s.config.settings.find().forEach(printjson); // create a sharded 'test.foo', for the moment with just one chunk diff --git a/jstests/sharding/disable_autosplit.js b/jstests/sharding/disable_autosplit.js index d62d41e95f4..d6982c3280a 100644 --- a/jstests/sharding/disable_autosplit.js +++ b/jstests/sharding/disable_autosplit.js @@ -1,11 +1,13 @@ -// Tests disabling of autosplit from mongos +// Tests disabling of autosplit. (function() { 'use strict'; var chunkSizeMB = 1; - var st = new ShardingTest({shards: 1, mongos: 1, other: {chunkSize: chunkSizeMB}}); - st.disableAutoSplit(); + // Autosplit is disabled by default, but specify it anyway in case the default changes, + // especially since it defaults to the enableBalancer setting. + var st = new ShardingTest( + {shards: 1, mongos: 1, other: {chunkSize: chunkSizeMB, enableAutoSplit: false}}); var data = "x"; while (data.length < chunkSizeMB * 1024 * 1024) { diff --git a/jstests/sharding/findandmodify2.js b/jstests/sharding/findandmodify2.js index 6df89a73d04..ab706a448c4 100644 --- a/jstests/sharding/findandmodify2.js +++ b/jstests/sharding/findandmodify2.js @@ -1,7 +1,7 @@ (function() { 'use strict'; - var s = new ShardingTest({shards: 2, mongos: 1, other: {chunkSize: 1}}); + var s = new ShardingTest({shards: 2, mongos: 1, other: {chunkSize: 1, enableAutoSplit: true}}); assert.commandWorked(s.s0.adminCommand({enablesharding: "test"})); var db = s.getDB("test"); diff --git a/jstests/sharding/jumbo1.js b/jstests/sharding/jumbo1.js index 594c8165ab2..315cd3ee6b6 100644 --- a/jstests/sharding/jumbo1.js +++ b/jstests/sharding/jumbo1.js @@ -1,7 +1,7 @@ (function() { 'use strict'; - var s = new ShardingTest({shards: 2, mongos: 1, other: {chunkSize: 1}}); + var s = new ShardingTest({shards: 2, mongos: 1, other: {chunkSize: 1, enableAutoSplit: true}}); assert.commandWorked(s.s0.adminCommand({enablesharding: "test"})); s.ensurePrimaryShard('test', 'shard0001'); diff --git a/jstests/sharding/move_chunk_wc.js b/jstests/sharding/move_chunk_wc.js index e94e9a01940..54a41c2d9fa 100644 --- a/jstests/sharding/move_chunk_wc.js +++ b/jstests/sharding/move_chunk_wc.js @@ -21,7 +21,6 @@ load('jstests/libs/write_concern_util.js'); config: 1, configReplSetTestOptions: {settings: {chainingAllowed: false}} }); - st.disableAutoSplit(); var mongos = st.s; var dbName = "move-chunk-wc-test"; diff --git a/jstests/sharding/movechunk_with_default_paranoia.js b/jstests/sharding/movechunk_with_default_paranoia.js index 52597fec149..97b8d5c6db1 100644 --- a/jstests/sharding/movechunk_with_default_paranoia.js +++ b/jstests/sharding/movechunk_with_default_paranoia.js @@ -2,7 +2,8 @@ * This test checks that moveParanoia defaults to off (ie the moveChunk directory will not * be created). */ -var st = new ShardingTest({shards: 2, mongos: 1, other: {chunkSize: 1}}); + +var st = new ShardingTest({shards: 2, mongos: 1, other: {chunkSize: 1, enableAutoSplit: true}}); load("jstests/sharding/movechunk_include.js"); setupMoveChunkTest(st); diff --git a/jstests/sharding/movechunk_with_moveParanoia.js b/jstests/sharding/movechunk_with_moveParanoia.js index f8c2fd0fbd8..740878507b2 100644 --- a/jstests/sharding/movechunk_with_moveParanoia.js +++ b/jstests/sharding/movechunk_with_moveParanoia.js @@ -1,8 +1,11 @@ /** * This test sets moveParanoia flag and then check that the directory is created with the moved data */ -var st = new ShardingTest( - {shards: 2, mongos: 1, other: {chunkSize: 1, shardOptions: {moveParanoia: ""}}}); +var st = new ShardingTest({ + shards: 2, + mongos: 1, + other: {chunkSize: 1, enableAutoSplit: true, shardOptions: {moveParanoia: ""}} +}); load("jstests/sharding/movechunk_include.js"); setupMoveChunkTest(st); diff --git a/jstests/sharding/movechunk_with_noMoveParanoia.js b/jstests/sharding/movechunk_with_noMoveParanoia.js index 4e75421543a..2ca6ef96f16 100644 --- a/jstests/sharding/movechunk_with_noMoveParanoia.js +++ b/jstests/sharding/movechunk_with_noMoveParanoia.js @@ -1,8 +1,11 @@ /** * This test sets moveParanoia flag and then check that the directory is created with the moved data */ -var st = new ShardingTest( - {shards: 2, mongos: 1, other: {chunkSize: 1, shardOptions: {noMoveParanoia: ""}}}); +var st = new ShardingTest({ + shards: 2, + mongos: 1, + other: {chunkSize: 1, enableAutoSplit: true, shardOptions: {noMoveParanoia: ""}} +}); load("jstests/sharding/movechunk_include.js"); setupMoveChunkTest(st); diff --git a/jstests/sharding/sharding_balance4.js b/jstests/sharding/sharding_balance4.js index 170448cbf11..4df4171bd39 100644 --- a/jstests/sharding/sharding_balance4.js +++ b/jstests/sharding/sharding_balance4.js @@ -1,8 +1,12 @@ // Check that doing updates done during a migrate all go to the right place (function() { - var s = new ShardingTest( - {name: "slow_sharding_balance4", shards: 2, mongos: 1, other: {chunkSize: 1}}); + var s = new ShardingTest({ + name: "slow_sharding_balance4", + shards: 2, + mongos: 1, + other: {chunkSize: 1, enableAutoSplit: true} + }); s.adminCommand({enablesharding: "test"}); s.ensurePrimaryShard('test', 'shard0001'); diff --git a/jstests/sharding/split_with_force.js b/jstests/sharding/split_with_force.js index c5bacd2dd28..7a40714c35c 100644 --- a/jstests/sharding/split_with_force.js +++ b/jstests/sharding/split_with_force.js @@ -7,8 +7,6 @@ var options = { }; var st = new ShardingTest({shards: 1, mongos: 1, other: options}); -st.disableAutoSplit(); -st.stopBalancer(); var mongos = st.s0; var admin = mongos.getDB("admin"); diff --git a/jstests/sharding/split_with_force_small.js b/jstests/sharding/split_with_force_small.js index ffc0e4d5bbd..2554d41048f 100644 --- a/jstests/sharding/split_with_force_small.js +++ b/jstests/sharding/split_with_force_small.js @@ -5,7 +5,6 @@ 'use strict'; 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 dc2fd701a78..0621d44196f 100644 --- a/jstests/sharding/stale_mongos_updates_and_removes.js +++ b/jstests/sharding/stale_mongos_updates_and_removes.js @@ -172,7 +172,7 @@ var checkAllUpdateQueries = function(makeMongosStaleFunc) { }; var st = new ShardingTest({shards: 2, mongos: 2}); -st.disableAutoSplit(); + var dbName = 'test'; var collNS = dbName + '.foo'; var numShardKeys = 10; diff --git a/jstests/sharding/top_chunk_autosplit.js b/jstests/sharding/top_chunk_autosplit.js index 6047e7a948c..2a8e40a787a 100644 --- a/jstests/sharding/top_chunk_autosplit.js +++ b/jstests/sharding/top_chunk_autosplit.js @@ -294,7 +294,8 @@ var maxSizeTests = [ var dbName = "TopChunkDB"; var collName = "coll"; -var st = shardSetup({name: "topchunk", shards: 4, chunkSize: 1}, dbName, collName); +var st = shardSetup( + {name: "topchunk", shards: 4, chunkSize: 1, other: {enableAutoSplit: true}}, dbName, collName); var db = st.getDB(dbName); var coll = db[collName]; var configDB = st.s.getDB('config'); @@ -310,7 +311,9 @@ for (var i = 0; i < tests.length; i++) { st.stop(); // Single node shard tests -st = shardSetup({name: "singleNode", shards: 1, chunkSize: 1}, dbName, collName); +st = shardSetup({name: "singleNode", shards: 1, chunkSize: 1, other: {enableAutoSplit: true}}, + dbName, + collName); db = st.getDB(dbName); coll = db[collName]; configDB = st.s.getDB('config'); @@ -327,8 +330,14 @@ st.stop(); // maxSize test // To set maxSize, must manually add the shards -st = shardSetup( - {name: "maxSize", shards: 2, chunkSize: 1, other: {manualAddShard: true}}, dbName, collName); +st = shardSetup({ + name: "maxSize", + shards: 2, + chunkSize: 1, + other: {manualAddShard: true, enableAutoSplit: true} +}, + dbName, + collName); db = st.getDB(dbName); coll = db[collName]; configDB = st.s.getDB('config'); diff --git a/jstests/sharding/write_cmd_auto_split.js b/jstests/sharding/write_cmd_auto_split.js index 0b340148787..1cf9b5ab39a 100644 --- a/jstests/sharding/write_cmd_auto_split.js +++ b/jstests/sharding/write_cmd_auto_split.js @@ -4,7 +4,7 @@ (function() { 'use strict'; - var st = new ShardingTest({shards: 1, other: {chunkSize: 1}}); + var st = new ShardingTest({shards: 1, other: {chunkSize: 1, enableAutoSplit: true}}); var configDB = st.s.getDB('config'); assert.commandWorked(configDB.adminCommand({enableSharding: 'test'})); diff --git a/jstests/sharding/zbigMapReduce.js b/jstests/sharding/zbigMapReduce.js index 9853982d535..ac4380267e8 100644 --- a/jstests/sharding/zbigMapReduce.js +++ b/jstests/sharding/zbigMapReduce.js @@ -9,7 +9,7 @@ function setupTest() { numReplicas: 2, chunkSize: 1, rsOptions: {oplogSize: 50}, - enableBalancer: 1 + enableBalancer: true } }); |