diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-10-22 11:18:50 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2015-10-23 09:50:35 -0400 |
commit | 3db9d1338c4d15b9b937516676645fd26d5f0a23 (patch) | |
tree | 639f8de38537f721aeeeb4c2eb804e9212428d65 /jstests/sharding/key_many.js | |
parent | c48ff0ba613fdafd51d26f664371522837809a9d (diff) | |
download | mongo-3db9d1338c4d15b9b937516676645fd26d5f0a23.tar.gz |
SERVER-21009 Remove usages of the multi-argument ShardingTest constructor
No functional changes, just converting everything to use the JSON-based
constructor.
Also moves some sharding-specific tests out of noPassthroughWithMongod and
under the sharding suite.
Diffstat (limited to 'jstests/sharding/key_many.js')
-rw-r--r-- | jstests/sharding/key_many.js | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/jstests/sharding/key_many.js b/jstests/sharding/key_many.js index a458d5a9284..1b512d646a4 100644 --- a/jstests/sharding/key_many.js +++ b/jstests/sharding/key_many.js @@ -1,8 +1,7 @@ -// key_many.js +(function() { -// values have to be sorted -// you must have exactly 6 values in each array -types = [ +// Values have to be sorted - you must have exactly 6 values in each array +var types = [ { name : "string" , values : [ "allan" , "bob" , "eliot" , "joe" , "mark" , "sara" ] , keyfield: "k" } , { name : "double" , values : [ 1.2 , 3.5 , 4.5 , 4.6 , 6.7 , 9.9 ] , keyfield : "a" } , { name : "date" , values : [ new Date( 1000000 ) , new Date( 2000000 ) , new Date( 3000000 ) , new Date( 4000000 ) , new Date( 5000000 ) , new Date( 6000000 ) ] , keyfield : "a" } , @@ -15,8 +14,7 @@ types = [ { name : "oid_other" , values : [ ObjectId() , ObjectId() , ObjectId() , ObjectId() , ObjectId() , ObjectId() ] , keyfield : "o" } , ] -s = new ShardingTest( "key_many" , 2 ); -s.setBalancer( false ) +var s = new ShardingTest({ name: "key_many", shards: 2 }); s.adminCommand( { enablesharding : "test" } ) db = s.getDB( "test" ); @@ -73,8 +71,6 @@ function getKey( o ){ return o; } - - for ( var i=0; i<types.length; i++ ){ curT = types[i]; //global @@ -156,7 +152,6 @@ for ( var i=0; i<types.length; i++ ){ // TODO remove } - s.stop(); - +})(); |