From e455a0fa9c571753bf07d4c951bfbf881005c3a7 Mon Sep 17 00:00:00 2001 From: Christopher Caplinger Date: Mon, 15 Aug 2022 17:59:10 +0000 Subject: SERVER-63454: Don't require tenantId for shard merge --- .../tenant_migration_recipient_current_op.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'jstests/replsets/tenant_migration_recipient_current_op.js') diff --git a/jstests/replsets/tenant_migration_recipient_current_op.js b/jstests/replsets/tenant_migration_recipient_current_op.js index 19d1bbdbd6d..0ca466c7a27 100644 --- a/jstests/replsets/tenant_migration_recipient_current_op.js +++ b/jstests/replsets/tenant_migration_recipient_current_op.js @@ -59,13 +59,21 @@ for (const db of dbsToClone) { // correct. function checkStandardFieldsOK(res) { assert.eq(res.inprog.length, 1, res); - assert.eq(bsonWoCompare(res.inprog[0].instanceID, kMigrationId), 0, res); - assert.eq(res.inprog[0].donorConnectionString, tenantMigrationTest.getDonorRst().getURL(), res); - assert.eq(bsonWoCompare(res.inprog[0].readPreference, kReadPreference), 0, res); + const { + instanceID, + donorConnectionString, + readPreference, + numRestartsDueToDonorConnectionFailure, + numRestartsDueToRecipientFailure, + tenantId + } = res.inprog[0]; + assert.eq(bsonWoCompare(instanceID, kMigrationId), 0, res); + assert.eq(donorConnectionString, tenantMigrationTest.getDonorRst().getURL(), res); + assert.eq(bsonWoCompare(readPreference, kReadPreference), 0, res); // We don't test failovers in this test so we don't expect these counters to be incremented. - assert.eq(res.inprog[0].numRestartsDueToDonorConnectionFailure, 0, res); - assert.eq(res.inprog[0].numRestartsDueToRecipientFailure, 0, res); - assert.eq(bsonWoCompare(res.inprog[0].tenantId, kTenantId), 0, res); + assert.eq(numRestartsDueToDonorConnectionFailure, 0, res); + assert.eq(numRestartsDueToRecipientFailure, 0, res); + assert.eq(bsonWoCompare(tenantId, kTenantId), 0, res); } // Check currentOp fields' expected value once the recipient is in state "consistent" or later. -- cgit v1.2.1