summaryrefslogtreecommitdiff
path: root/jstests/sharding/addshard1.js
diff options
context:
space:
mode:
authorSviatlana Zuiko <sviatlana.zuiko@mongodb.com>2022-09-02 18:22:50 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-02 21:21:06 +0000
commit56fa5811e2173dddfcb25689e15dafc680e9b0a6 (patch)
treecc64e8ce7feb6895b0759090f3b07549383bcd0e /jstests/sharding/addshard1.js
parentec5028908821ebf172a48499741a2b3c3f0b16af (diff)
downloadmongo-56fa5811e2173dddfcb25689e15dafc680e9b0a6.tar.gz
Revert "SERVER-66297 get rid of maxSize"
This reverts commit 22f21e6e5a8086b3766485cc323ce9673587f30c.
Diffstat (limited to 'jstests/sharding/addshard1.js')
-rw-r--r--jstests/sharding/addshard1.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/jstests/sharding/addshard1.js b/jstests/sharding/addshard1.js
index 2ca178282f8..81a161fcc84 100644
--- a/jstests/sharding/addshard1.js
+++ b/jstests/sharding/addshard1.js
@@ -22,19 +22,14 @@ var configDB = s.s.getDB('config');
assert.eq(null, configDB.databases.findOne({_id: 'testDB'}));
var newShard = "myShard";
-assert.commandWorked(s.admin.runCommand({addShard: rs1.getURL(), name: newShard}));
+assert.commandWorked(s.admin.runCommand({addShard: rs1.getURL(), name: newShard, maxSize: 1024}));
assert.neq(null, configDB.databases.findOne({_id: 'testDB'}));
var newShardDoc = configDB.shards.findOne({_id: newShard});
+assert.eq(1024, newShardDoc.maxSize);
assert(newShardDoc.topologyTime instanceof Timestamp);
-// maxSize field is no longer supported
-var newShardMaxSize = "myShardMaxSize";
-assert.commandFailedWithCode(
- s.admin.runCommand({addShard: rs1.getURL(), name: newShardMaxSize, maxSize: 1024}),
- ErrorCodes.InvalidOptions);
-
// a mongod with an existing database name should not be allowed to become a shard
var rs2 = new ReplSetTest({name: "addshard1-2", nodes: 1});
rs2.startSet({shardsvr: ""});