Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -37,7 +37,7 @@ ParticipantManagement::PpmTests::~PpmTests()
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::startTest()
{
INFO_LOG() << "********* startTest **************";
INFO_LOG(m_logger) << "********* startTest **************";
switch (m_testId)
{
case 1:
@@ -83,14 +83,14 @@ void ParticipantManagement::PpmTests::startTest()
failExit();
break;
}
INFO_LOG() << "********* endTest **************";
INFO_LOG(m_logger) << "********* endTest **************";
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
//--------------------------------------------------------------------------------
bool ParticipantManagement::PpmTests::init(int domainId, int exerciseId, int testId, int partyId, int typeId, int equipmentId, int participantId)
{
INFO_LOG() << "init begin";
INFO_LOG(m_logger) << "init begin";
m_testId = testId;
m_partyId = partyId;
@@ -107,22 +107,22 @@ bool ParticipantManagement::PpmTests::init(int domainId, int exerciseId, int tes
return false;
m_ddsConnector->initPublisherSubscriber();
DEBUG_LOG() << "create DTC PPM";
DEBUG_LOG(m_logger) << "create DTC PPM";
m_dtc = ParticipantManagement::Interface::Dtc::create(m_ddsConnector);
DEBUG_LOG() << "init DTC PPM";
DEBUG_LOG(m_logger) << "init DTC PPM";
bool bRet = m_dtc->enableAll();
DEBUG_LOG() << "create FTC PPM";
DEBUG_LOG(m_logger) << "create FTC PPM";
m_ftc = ParticipantManagement::Interface::Ftc::create(m_ddsConnector);
DEBUG_LOG() << "init FTC PPM";
DEBUG_LOG(m_logger) << "init FTC PPM";
bRet &= m_ftc->enableAll();
DEBUG_LOG() << "init end PPM - bRet = " << bRet;
DEBUG_LOG(m_logger) << "init end PPM - bRet = " << bRet;
DEBUG_LOG() << "Domain Id = " << domainId;
DEBUG_LOG() << "Test Id = " << testId;
DEBUG_LOG() << "Party Id = " << partyId;
DEBUG_LOG() << "Type Id = " << typeId;
DEBUG_LOG() << "Equipment Id = " << equipmentId;
DEBUG_LOG(m_logger) << "Domain Id = " << domainId;
DEBUG_LOG(m_logger) << "Test Id = " << testId;
DEBUG_LOG(m_logger) << "Party Id = " << partyId;
DEBUG_LOG(m_logger) << "Type Id = " << typeId;
DEBUG_LOG(m_logger) << "Equipment Id = " << equipmentId;
return bRet;
}
@@ -130,7 +130,7 @@ bool ParticipantManagement::PpmTests::init(int domainId, int exerciseId, int tes
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::tryCreateTemplate()
{
INFO_LOG() << "Trying to send Create Template";
INFO_LOG(m_logger) << "Trying to send Create Template";
std::vector<ParticipantManagement::TemplateData> data;
@@ -148,13 +148,13 @@ void ParticipantManagement::PpmTests::tryCreateTemplate()
m_dtc->waitForHistoricalDataTemplateParticipant();
ParticipantManagement::TemplateParticipant tp = m_dtc->templateParticipant(1);
const ParticipantManagement::TemplateData tdSup(m_dtc->convertFromParticipantTemplateToTemplateData(tp));
DEBUG_LOG() << "SuperiorModId: " << tdSup.modId();
DEBUG_LOG(m_logger) << "SuperiorModId: " << tdSup.modId();
data.push_back(tdSup);
if (!m_ftc->modifyTemplateDataRequest(ModifyTemplateDataRequest(data),this))
{
ERROR_LOG() << "Error creating template data";
ERROR_LOG(m_logger) << "Error creating template data";
failExit();
}
QTest::qWait(1000);
@@ -164,7 +164,7 @@ void ParticipantManagement::PpmTests::tryCreateTemplate()
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::tryCreateParticipant()
{
INFO_LOG() << "Trying to send Create ParticipantData per ModifyParticipantData";
INFO_LOG(m_logger) << "Trying to send Create ParticipantData per ModifyParticipantData";
ParticipantManagement::ParticipantData ptd;
ptd.modId(1);
@@ -182,7 +182,7 @@ void ParticipantManagement::PpmTests::tryCreateParticipant()
if (!m_ftc->modifyParticipantDataRequest(req,this))
{
ERROR_LOG() << "Error creating participant data";
ERROR_LOG(m_logger) << "Error creating participant data";
failExit();
}
QTest::qWait(1000);
@@ -192,7 +192,7 @@ void ParticipantManagement::PpmTests::tryCreateParticipant()
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::tryUpdateInfoParticipant()
{
INFO_LOG() << "Trying to send update info per registerForParticantRequest";
INFO_LOG(m_logger) << "Trying to send update info per registerForParticantRequest";
ParticipantManagement::RegisterParticipantRequest rpr;
rpr.participantId(m_participantId);
@@ -203,7 +203,7 @@ void ParticipantManagement::PpmTests::tryUpdateInfoParticipant()
if (!m_ftc->registerParticipantRequest(rpr,this))
{
ERROR_LOG() << "Error updating info/identification for participant";
ERROR_LOG(m_logger) << "Error updating info/identification for participant";
failExit();
}
QTest::qWait(1000);
@@ -212,7 +212,7 @@ void ParticipantManagement::PpmTests::tryUpdateInfoParticipant()
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::tryRegisterParticipant()
{
INFO_LOG() << "Trying to send registerForParticantRequest";
INFO_LOG(m_logger) << "Trying to send registerForParticantRequest";
ParticipantManagement::RegisterParticipantRequest rpr;
rpr.participantId(m_participantId);
@@ -223,7 +223,7 @@ void ParticipantManagement::PpmTests::tryRegisterParticipant()
if (!m_ftc->registerParticipantRequest(rpr,this))
{
ERROR_LOG() << "Error updating info/identification for participant";
ERROR_LOG(m_logger) << "Error updating info/identification for participant";
failExit();
}
QTest::qWait(1000);
@@ -232,7 +232,7 @@ void ParticipantManagement::PpmTests::tryRegisterParticipant()
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::tryCreateParty()
{
INFO_LOG() << "Trying to Create Party per ModifyPartyData";
INFO_LOG(m_logger) << "Trying to Create Party per ModifyPartyData";
ParticipantManagement::Party party;
@@ -251,7 +251,7 @@ void ParticipantManagement::PpmTests::tryCreateParty()
if (!m_ftc->modifyPartyDataRequest(req, this))
{
ERROR_LOG() << "Error creating party data";
ERROR_LOG(m_logger) << "Error creating party data";
failExit();
}
@@ -269,7 +269,7 @@ void ParticipantManagement::PpmTests::tryCreateParty()
if (!m_ftc->modifyPartyDataRequest(req, this))
{
ERROR_LOG() << "Error creating party data";
ERROR_LOG(m_logger) << "Error creating party data";
failExit();
}
@@ -287,7 +287,7 @@ void ParticipantManagement::PpmTests::tryCreateParty()
if (!m_ftc->modifyPartyDataRequest(req, this))
{
ERROR_LOG() << "Error creating party data";
ERROR_LOG(m_logger) << "Error creating party data";
failExit();
}
@@ -305,7 +305,7 @@ void ParticipantManagement::PpmTests::tryCreateParty()
if (!m_ftc->modifyPartyDataRequest(req, this))
{
ERROR_LOG() << "Error creating party data";
ERROR_LOG(m_logger) << "Error creating party data";
failExit();
}
@@ -316,7 +316,7 @@ void ParticipantManagement::PpmTests::tryCreateParty()
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::tryModifyParty()
{
INFO_LOG() << "Trying to send Modify PartyData per ModifyPartyData";
INFO_LOG(m_logger) << "Trying to send Modify PartyData per ModifyPartyData";
ParticipantManagement::Party party;
@@ -324,7 +324,7 @@ void ParticipantManagement::PpmTests::tryModifyParty()
party = m_dtc->party(m_partyId);
if (party.id() < 0)
{
ERROR_LOG() << "Party not found: id = " << m_partyId;
ERROR_LOG(m_logger) << "Party not found: id = " << m_partyId;
failExit();
}
@@ -338,7 +338,7 @@ void ParticipantManagement::PpmTests::tryModifyParty()
if (!m_ftc->modifyPartyDataRequest(req, this))
{
ERROR_LOG() << "Error modifying party data";
ERROR_LOG(m_logger) << "Error modifying party data";
failExit();
}
@@ -348,7 +348,7 @@ void ParticipantManagement::PpmTests::tryModifyParty()
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::tryRemoveParty()
{
INFO_LOG() << "Trying to send RemoveParty";
INFO_LOG(m_logger) << "Trying to send RemoveParty";
ParticipantManagement::Party party;
@@ -356,7 +356,7 @@ void ParticipantManagement::PpmTests::tryRemoveParty()
party = m_dtc->party(m_partyId);
if (party.id() < 0)
{
ERROR_LOG() << "Party not found: id = " << m_partyId;
ERROR_LOG(m_logger) << "Party not found: id = " << m_partyId;
failExit();
}
@@ -367,12 +367,12 @@ void ParticipantManagement::PpmTests::tryRemoveParty()
{
if (party.isUsedBy())
{
INFO_LOG() << "Not possible to delete used party!" ;
INFO_LOG(m_logger) << "Not possible to delete used party!" ;
successExit();
}
else
{
ERROR_LOG() << "Failed to delete not used party with id " << m_partyId;
ERROR_LOG(m_logger) << "Failed to delete not used party with id " << m_partyId;
failExit();
}
}
@@ -383,14 +383,14 @@ void ParticipantManagement::PpmTests::tryRemoveParty()
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::trySyncParties()
{
INFO_LOG() << "Trying to sync parties with Ex 0";
INFO_LOG(m_logger) << "Trying to sync parties with Ex 0";
SyncPartiesRequest req;
req.exerciseId(42);
if (!m_ftc->syncPartiesRequest(req, this))
{
ERROR_LOG() << "Error sync parties";
ERROR_LOG(m_logger) << "Error sync parties";
failExit();
}
@@ -400,7 +400,7 @@ void ParticipantManagement::PpmTests::trySyncParties()
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::tryChangeUsed()
{
INFO_LOG() << "Trying to send change used";
INFO_LOG(m_logger) << "Trying to send change used";
ParticipantManagement::Party party;
@@ -408,7 +408,7 @@ void ParticipantManagement::PpmTests::tryChangeUsed()
party = m_dtc->party(m_partyId);
if (party.id() < 0)
{
ERROR_LOG() << "Party not found: id = " << m_partyId;
ERROR_LOG(m_logger) << "Party not found: id = " << m_partyId;
failExit();
}
@@ -418,7 +418,7 @@ void ParticipantManagement::PpmTests::tryChangeUsed()
if (!m_ftc->changePartyUsedStateRequest(req, this))
{
ERROR_LOG() << "Error modifying used party";
ERROR_LOG(m_logger) << "Error modifying used party";
failExit();
}
@@ -429,7 +429,7 @@ void ParticipantManagement::PpmTests::tryChangeUsed()
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::tryCreateEquipmentType()
{
INFO_LOG() << "Trying to send Create EquipmentType per ModifyEquipmentTypeDataRequest";
INFO_LOG(m_logger) << "Trying to send Create EquipmentType per ModifyEquipmentTypeDataRequest";
ParticipantManagement::EquipmentType etd;
etd.id(1);
@@ -446,7 +446,7 @@ void ParticipantManagement::PpmTests::tryCreateEquipmentType()
if (!m_ftc->modifyEquipmentTypeDataRequest(ModifyEquipmentTypeDataRequest(data, false),this))
{
ERROR_LOG() << "Error creating equipment type data";
ERROR_LOG(m_logger) << "Error creating equipment type data";
failExit();
}
QTest::qWait(1000);
@@ -456,7 +456,7 @@ void ParticipantManagement::PpmTests::tryCreateEquipmentType()
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::tryCreateType()
{
INFO_LOG() << "Trying to send CreateTypeRequest";
INFO_LOG(m_logger) << "Trying to send CreateTypeRequest";
if (!m_ftc->modifyTypeRequest(Type(0,
ParticipantManagement::TypeClass::SupportEntity,
@@ -469,7 +469,7 @@ void ParticipantManagement::PpmTests::tryCreateType()
{}, std::string()),
this))
{
ERROR_LOG() << "Error creating type data";
ERROR_LOG(m_logger) << "Error creating type data";
failExit();
}
@@ -479,7 +479,7 @@ void ParticipantManagement::PpmTests::tryCreateType()
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::tryModifyType()
{
INFO_LOG() << "Trying to send ModifyTypeRequest";
INFO_LOG(m_logger) << "Trying to send ModifyTypeRequest";
if (!m_ftc->modifyTypeRequest(Type(m_typeId,
ParticipantManagement::TypeClass::SupportEntity,
@@ -492,7 +492,7 @@ void ParticipantManagement::PpmTests::tryModifyType()
{}, std::string()),
this))
{
ERROR_LOG() << "Error modifying type data";
ERROR_LOG(m_logger) << "Error modifying type data";
failExit();
}
QTest::qWait(1000);
@@ -501,11 +501,11 @@ void ParticipantManagement::PpmTests::tryModifyType()
//--------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::tryRemoveType()
{
INFO_LOG() << "Trying to send RemoveTypeRequest";
INFO_LOG(m_logger) << "Trying to send RemoveTypeRequest";
if (!m_ftc->removeTypeRequest(RemoveTypeRequest(m_typeId), this))
{
ERROR_LOG() << "Error modifying type data";
ERROR_LOG(m_logger) << "Error modifying type data";
failExit();
}
QTest::qWait(1000);
@@ -515,7 +515,7 @@ void ParticipantManagement::PpmTests::tryRemoveType()
// ------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::onError(const QString &reason)
{
ERROR_LOG() << "Got Reply error: " << reason;
ERROR_LOG(m_logger) << "Got Reply error: " << reason;
failExit();
}
@@ -527,7 +527,7 @@ void ParticipantManagement::PpmTests::onCreateReply(const Core::FunctionReplyObj
onError(replyObject.translated());
return;
}
INFO_LOG() << "Got createReply with id " << replyObject.id()
INFO_LOG(m_logger) << "Got createReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
@@ -540,7 +540,7 @@ void ParticipantManagement::PpmTests::onModifyReply(const Core::FunctionReplyObj
onError(replyObject.translated());
return;
}
INFO_LOG() << "Got modifyRequest with id " << replyObject.id()
INFO_LOG(m_logger) << "Got modifyRequest with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
@@ -553,7 +553,7 @@ void ParticipantManagement::PpmTests::onRemoveReply(const Core::FunctionReplyObj
onError(replyObject.translated());
return;
}
INFO_LOG() << "Got removeReply with id " << replyObject.id()
INFO_LOG(m_logger) << "Got removeReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
@@ -566,7 +566,7 @@ void ParticipantManagement::PpmTests::onSyncPartiesReply(const Core::FunctionRep
onError(replyObject.translated());
return;
}
INFO_LOG() << "Got syncParties with id " << replyObject.id()
INFO_LOG(m_logger) << "Got syncParties with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
@@ -585,22 +585,22 @@ void ParticipantManagement::PpmTests::onRemovePartyReply(const Core::FunctionRep
onError(replyObject.translated());
return;
}
INFO_LOG() << "Got removeReply with id " << replyObject.id()
INFO_LOG(m_logger) << "Got removeReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
void ParticipantManagement::PpmTests::onRegisterParticipantReply(const RegisterReply &reply)
{
ERROR_LOG() << "onRegisterParticipantReply " << reply.errorString() << "exerciseId: " << reply.exerciseId();
ERROR_LOG(m_logger) << "onRegisterParticipantReply " << reply.errorString() << "exerciseId: " << reply.exerciseId();
for ( std::string str : reply.errorParams())
ERROR_LOG() << "error params: " << str;
ERROR_LOG(m_logger) << "error params: " << str;
}
// ------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::failExit()
{
ERROR_LOG() << "FAIL EXIT !";
ERROR_LOG(m_logger) << "FAIL EXIT !";
m_bTestsSuccessful = false;
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
@@ -608,7 +608,7 @@ void ParticipantManagement::PpmTests::failExit()
// ------------------------------------------------------------------------------
void ParticipantManagement::PpmTests::successExit()
{
INFO_LOG() << "SUCCESS EXIT !";
INFO_LOG(m_logger) << "SUCCESS EXIT !";
m_bTestsSuccessful = true;
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}