diff options
Diffstat (limited to 'jstests/replsets/tenant_migration_donor_startup_recovery.js')
-rw-r--r-- | jstests/replsets/tenant_migration_donor_startup_recovery.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/jstests/replsets/tenant_migration_donor_startup_recovery.js b/jstests/replsets/tenant_migration_donor_startup_recovery.js index 7a564e416a5..f10c1c90d45 100644 --- a/jstests/replsets/tenant_migration_donor_startup_recovery.js +++ b/jstests/replsets/tenant_migration_donor_startup_recovery.js @@ -8,6 +8,7 @@ * incompatible_with_macos, * incompatible_with_shard_merge, * incompatible_with_windows_tls, + * requires_fcv_62, * requires_majority_read_concern, * requires_persistence, * serverless, @@ -20,6 +21,7 @@ load("jstests/libs/fail_point_util.js"); load("jstests/libs/uuid_util.js"); load("jstests/replsets/libs/tenant_migration_test.js"); +const {ServerlessLockType, getServerlessOperationLock} = TenantMigrationUtil; const donorRst = new ReplSetTest({ nodes: 1, @@ -70,7 +72,8 @@ donorRst.startSet({ donorPrimary = donorRst.getPrimary(); const configDonorsColl = donorPrimary.getCollection(TenantMigrationTest.kConfigDonorsNS); -const donorDoc = configDonorsColl.findOne({tenantId: kTenantId}); +assert.lte(configDonorsColl.count(), 1); +const donorDoc = configDonorsColl.findOne(); if (donorDoc) { switch (donorDoc.state) { case TenantMigrationTest.DonorState.kAbortingIndexBuilds: @@ -133,6 +136,13 @@ if (donorDoc) { } } +const activeServerlessLock = getServerlessOperationLock(donorPrimary); +if (donorDoc && !donorDoc.expireAt) { + assert.eq(activeServerlessLock, ServerlessLockType.TenantMigrationDonor); +} else { + assert.eq(activeServerlessLock, null); +} + tenantMigrationTest.stop(); donorRst.stopSet(); })(); |