diff --git a/fdbserver/workloads/MetaclusterManagementWorkload.actor.cpp b/fdbserver/workloads/MetaclusterManagementWorkload.actor.cpp index 878f0467ec..b76a12beeb 100644 --- a/fdbserver/workloads/MetaclusterManagementWorkload.actor.cpp +++ b/fdbserver/workloads/MetaclusterManagementWorkload.actor.cpp @@ -1378,6 +1378,8 @@ struct MetaclusterManagementWorkload : TestWorkload { auto tenantData = self->createdTenants.find(tenant); ASSERT(tenantData != self->createdTenants.end()); + ASSERT(!tenantData->second->lockId.present() || lockId == tenantData->second->lockId.get()); + auto& dataDb = self->dataDbs[tenantData->second->cluster]; ASSERT(dataDb->registered); @@ -1398,12 +1400,15 @@ struct MetaclusterManagementWorkload : TestWorkload { if (e.code() == error_code_tenant_not_found) { ASSERT(!exists); return Void(); - } else if (e.code() == error_code_invalid_tenant_configuration) { - ASSERT(exists); - return Void(); } else if (e.code() == error_code_invalid_metacluster_operation) { ASSERT(!self->metaclusterCreated); return Void(); + } else if (e.code() == error_code_tenant_locked) { + ASSERT(exists); + auto tenantData = self->createdTenants.find(tenant); + ASSERT(tenantData != self->createdTenants.end()); + ASSERT(tenantData->second->lockId.present() && lockId != tenantData->second->lockId.get()); + return Void(); } TraceEvent(SevError, "LockTenantFailure")