summaryrefslogtreecommitdiff
path: root/jstests/multiVersion
diff options
context:
space:
mode:
authorJordi Serra Torrens <jordi.serra-torrens@mongodb.com>2021-01-26 14:52:45 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-02-01 10:47:03 +0000
commit522299492aa5a78339aa8ebb07e88e567ba125d7 (patch)
treef49c393c41e81a99ebe97e83c0daeb2b9fab2222 /jstests/multiVersion
parentde1a08ce57ff10e5b7c79448214b781e9ae5417e (diff)
downloadmongo-522299492aa5a78339aa8ebb07e88e567ba125d7.tar.gz
SERVER-53105: Target chunks by collectionUUID
Diffstat (limited to 'jstests/multiVersion')
-rw-r--r--jstests/multiVersion/upgrade_downgrade_sharded_cluster.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/jstests/multiVersion/upgrade_downgrade_sharded_cluster.js b/jstests/multiVersion/upgrade_downgrade_sharded_cluster.js
index b282408a7d5..5f5c93b5c94 100644
--- a/jstests/multiVersion/upgrade_downgrade_sharded_cluster.js
+++ b/jstests/multiVersion/upgrade_downgrade_sharded_cluster.js
@@ -201,17 +201,20 @@ function testChunkCollectionUuidFieldChecksAfterUpgrade() {
const ns = "sharded.test_chunk_uuid";
var collUUID = st.config.collections.findOne({_id: ns}).uuid;
- var cursor = st.config.chunks.find({ns});
+ var cursor = findChunksUtil.findChunksByNs(st.config, ns);
assert(cursor.hasNext());
do {
assert.eq(collUUID, cursor.next().uuid);
} while (cursor.hasNext());
+
+ // Check no chunk with ns is left after upgrade
+ assert.eq(0, st.config.chunks.count({ns: {$exists: true}}));
}
function testChunkCollectionUuidFieldChecksAfterFCVDowngrade() {
const ns = "sharded.test_chunk_uuid";
- var cursor = st.config.chunks.find({ns});
+ var cursor = findChunksUtil.findChunksByNs(st.config, ns);
assert(cursor.hasNext());
do {
assert.eq(undefined, cursor.next().uuid);