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

@@ -79,39 +79,39 @@ ModuleTestAesOthers::ModuleTestAesOthers(int domainId, int exerciseId)
void ModuleTestAesOthers::onSetSimulatedPositionReply(const Core::FunctionReplyObject &replyObject)
{
m_replyError = replyObject.error();
DEBUG_LOG() << " got reply - onSetSimulatedPositionReply : " << m_replyError;
DEBUG_LOG(m_logger) << " got reply - onSetSimulatedPositionReply : " << m_replyError;
if (!replyObject.str().empty())
ERROR_LOG() << " got reply - onExplosionClusterModifyReply: " << replyObject.translated();
ERROR_LOG(m_logger) << " got reply - onExplosionClusterModifyReply: " << replyObject.translated();
}
void ModuleTestAesOthers::onBoobyTrapModifyReply(const Core::FunctionReplyObject &replyObject)
{
m_replyError = replyObject.error();
DEBUG_LOG() << " got reply - onBoobyTrapModifyReply : " << m_replyError;
DEBUG_LOG(m_logger) << " got reply - onBoobyTrapModifyReply : " << m_replyError;
if (!replyObject.str().empty())
ERROR_LOG() << " got reply - onBoobyTrapModifyReply: " << replyObject.translated();
ERROR_LOG(m_logger) << " got reply - onBoobyTrapModifyReply: " << replyObject.translated();
}
void ModuleTestAesOthers::onBoobyTrapRemoveReply(const Core::FunctionReplyObject &replyObject)
{
DEBUG_LOG() << " got reply - onBoobyTrapRemoveReply : " << m_replyError;
DEBUG_LOG(m_logger) << " got reply - onBoobyTrapRemoveReply : " << m_replyError;
if (!replyObject.str().empty())
ERROR_LOG() << " got reply - onBoobyTrapRemoveReply: " << replyObject.translated();
ERROR_LOG(m_logger) << " got reply - onBoobyTrapRemoveReply: " << replyObject.translated();
}
void ModuleTestAesOthers::onOffRouteMineModifyReply(const Core::FunctionReplyObject &replyObject)
{
m_replyError = replyObject.error();
DEBUG_LOG() << " got reply - onOffRouteMineModifyReply : " << m_replyError;
DEBUG_LOG(m_logger) << " got reply - onOffRouteMineModifyReply : " << m_replyError;
if (!replyObject.str().empty())
ERROR_LOG() << " got reply - onOffRouteMineModifyReply: " << replyObject.translated();
ERROR_LOG(m_logger) << " got reply - onOffRouteMineModifyReply: " << replyObject.translated();
}
void ModuleTestAesOthers::onOffRouteMineRemoveReply(const Core::FunctionReplyObject &replyObject)
{
DEBUG_LOG() << " got reply - onOffRouteMineRemoveReply : " << m_replyError;
DEBUG_LOG(m_logger) << " got reply - onOffRouteMineRemoveReply : " << m_replyError;
if (!replyObject.str().empty())
ERROR_LOG() << " got reply - onOffRouteMineRemoveReply: " << replyObject.translated();
ERROR_LOG(m_logger) << " got reply - onOffRouteMineRemoveReply: " << replyObject.translated();
}
@@ -128,10 +128,10 @@ void ModuleTestAesOthers::boobyTrapChanged(const BoobyTrap &data, DataModificati
if (m_dataBoobyTrap.effectStart().is_set())
startTimeMsec = m_dataBoobyTrap.effectStart().get();
DEBUG_LOG() << " got changed - m_dataBoobyTrap: " << m_dataBoobyTrap.id() << ", state=" << m_dataBoobyTrap.effectStateId()
DEBUG_LOG(m_logger) << " got changed - m_dataBoobyTrap: " << m_dataBoobyTrap.id() << ", state=" << m_dataBoobyTrap.effectStateId()
<< ", startTimeMsec=" << startTimeMsec
<< ", cntBoobyTrap=" << m_counterDds.cntBoobyTrap;
TRACE_LOG() << " got changed - m_dataBoobyTrap: " << m_dataBoobyTrap;
TRACE_LOG(m_logger) << " got changed - m_dataBoobyTrap: " << m_dataBoobyTrap;
}
void ModuleTestAesOthers::offRouteMineChanged(const OffRouteMine &data, DataModification modType)
@@ -147,10 +147,10 @@ void ModuleTestAesOthers::offRouteMineChanged(const OffRouteMine &data, DataModi
if (m_dataOffRouteMine.effectStart().is_set())
startTimeMsec = m_dataOffRouteMine.effectStart().get();
DEBUG_LOG() << " got changed - m_dataOffRouteMine: " << m_dataOffRouteMine.id() << ", state=" << m_dataOffRouteMine.effectStateId()
DEBUG_LOG(m_logger) << " got changed - m_dataOffRouteMine: " << m_dataOffRouteMine.id() << ", state=" << m_dataOffRouteMine.effectStateId()
<< ", startTimeMsec=" << startTimeMsec
<< ", cntOffRouteMine=" << m_counterDds.cntOffRouteMine;
TRACE_LOG() << " got changed - m_dataOffRouteMine: " << m_dataOffRouteMine;
TRACE_LOG(m_logger) << " got changed - m_dataOffRouteMine: " << m_dataOffRouteMine;
}
@@ -160,7 +160,7 @@ void ModuleTestAesOthers::onAesItemViewChanged(const AesItemView &aesItemView, D
return;
AreaEffectSimulation::AesType_def::type aesType = aesItemView.aesTypeId().underlying();
DEBUG_LOG() << " got onAesItemViewChanged, aesType=" << aesType;
DEBUG_LOG(m_logger) << " got onAesItemViewChanged, aesType=" << aesType;
switch (aesType)
{
@@ -197,7 +197,7 @@ bool ModuleTestAesOthers::waitForData(const std::function<bool ()> &func, int re
for (int i = 0; i < retryCount; ++i)
{
DEBUG_LOG() << " waitForData - i: " << i;
DEBUG_LOG(m_logger) << " waitForData - i: " << i;
if (func())
return true;
QTest::qWait(100);
@@ -210,23 +210,23 @@ void ModuleTestAesOthers::waitForEffectStatesBT(int lineNumber, int durPrep, int
// expected condition:
if (!waitForData([this]() { return m_replyError == false; }, 1))
{
ERROR_LOG() << "Error on request" << ", lineNumber = " << lineNumber;
ERROR_LOG(m_logger) << "Error on request" << ", lineNumber = " << lineNumber;
return;
}
INFO_LOG() << Q_FUNC_INFO << " waiting for EsPrepared...";
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared...";
if (!waitForData([this]() { return m_dataBoobyTrap.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared;}, durPrep))
{
ERROR_LOG() << "Timeout waiting for EsPrepared of m_dataBoobyTrap with id " << m_dataBoobyTrap.id()
ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of m_dataBoobyTrap with id " << m_dataBoobyTrap.id()
<< ", lineNumber = " << lineNumber;
QVERIFY2(false, "ERROR, exit");
return;
}
INFO_LOG() << Q_FUNC_INFO << " waiting for EsActivated...";
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsActivated...";
if (!waitForData([this]() { return m_dataBoobyTrap.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated;}, durAct))
{
ERROR_LOG() << "Timeout waiting for EsActivated of m_dataBoobyTrapr with id " << m_dataBoobyTrap.id()
ERROR_LOG(m_logger) << "Timeout waiting for EsActivated of m_dataBoobyTrapr with id " << m_dataBoobyTrap.id()
<< ", lineNumber = " << lineNumber;
QVERIFY2(false, "ERROR, exit");
return;
@@ -234,10 +234,10 @@ void ModuleTestAesOthers::waitForEffectStatesBT(int lineNumber, int durPrep, int
if (durExp > 0)
{
INFO_LOG() << Q_FUNC_INFO << " waiting for EsExpired...";
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsExpired...";
if (!waitForData([this]() { return m_dataBoobyTrap.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired;}, durExp))
{
ERROR_LOG() << "Timeout waiting for EsExpired of m_dataBoobyTrap with id " << m_dataBoobyTrap.id()
ERROR_LOG(m_logger) << "Timeout waiting for EsExpired of m_dataBoobyTrap with id " << m_dataBoobyTrap.id()
<< ", lineNumber = " << lineNumber;
QVERIFY2(false, "ERROR, exit");
return;
@@ -250,23 +250,23 @@ void ModuleTestAesOthers::waitForEffectStatesORM(int lineNumber, int durPrep, in
// expected condition:
if (!waitForData([this]() { return m_replyError == false; }, 1))
{
ERROR_LOG() << "Error on request" << ", lineNumber = " << lineNumber;
ERROR_LOG(m_logger) << "Error on request" << ", lineNumber = " << lineNumber;
return;
}
INFO_LOG() << Q_FUNC_INFO << " waiting for EsPrepared...";
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared...";
if (!waitForData([this]() { return m_dataOffRouteMine.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared;}, durPrep))
{
ERROR_LOG() << "Timeout waiting for EsPrepared of m_dataOffRouteMine with id " << m_dataOffRouteMine.id()
ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of m_dataOffRouteMine with id " << m_dataOffRouteMine.id()
<< ", lineNumber = " << lineNumber;
QVERIFY2(false, "ERROR, exit");
return;
}
INFO_LOG() << Q_FUNC_INFO << " waiting for EsActivated...";
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsActivated...";
if (!waitForData([this]() { return m_dataOffRouteMine.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated;}, durAct))
{
ERROR_LOG() << "Timeout waiting for EsActivated of m_dataOffRouteMine with id " << m_dataOffRouteMine.id()
ERROR_LOG(m_logger) << "Timeout waiting for EsActivated of m_dataOffRouteMine with id " << m_dataOffRouteMine.id()
<< ", lineNumber = " << lineNumber;
QVERIFY2(false, "ERROR, exit");
return;
@@ -274,10 +274,10 @@ void ModuleTestAesOthers::waitForEffectStatesORM(int lineNumber, int durPrep, in
if (durExp > 0)
{
INFO_LOG() << Q_FUNC_INFO << " waiting for EsExpired...";
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsExpired...";
if (!waitForData([this]() { return m_dataOffRouteMine.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired;}, durExp))
{
ERROR_LOG() << "Timeout waiting for EsExpired of m_dataOffRouteMine with id " << m_dataOffRouteMine.id()
ERROR_LOG(m_logger) << "Timeout waiting for EsExpired of m_dataOffRouteMine with id " << m_dataOffRouteMine.id()
<< ", lineNumber = " << lineNumber;
QVERIFY2(false, "ERROR, exit");
return;
@@ -288,7 +288,7 @@ void ModuleTestAesOthers::waitForEffectStatesORM(int lineNumber, int durPrep, in
void ModuleTestAesOthers::setupParticipants()
{
INFO_LOG() << " setupParticipant ...";
INFO_LOG(m_logger) << " setupParticipant ...";
QVERIFY2(m_ppmFtc, "ERROR, no m_ppmFtc");
@@ -304,18 +304,18 @@ void ModuleTestAesOthers::setupParticipants()
QPointF pos = utmPos.geographic();
req.position(Core::GeoPosition(pos.x(), pos.y(), 0.0));
INFO_LOG() << " setSimulatedPositionRequest ...";
INFO_LOG(m_logger) << " setSimulatedPositionRequest ...";
m_replyError = true;
m_ppmFtc->setSimulatedPositionRequest(req, this);
// expected condition:
if (!waitForData([this]() { return m_replyError == false; }))
{
ERROR_LOG() << "Error on request";
ERROR_LOG(m_logger) << "Error on request";
}
}
}
INFO_LOG() << " setSimulatedPositionRequest ...DONE";
INFO_LOG(m_logger) << " setSimulatedPositionRequest ...DONE";
}
bool ModuleTestAesOthers::checkParticipant_18()
@@ -324,7 +324,7 @@ bool ModuleTestAesOthers::checkParticipant_18()
const int partId = 18;
const ParticipantManagement::ParticipantPosition &pos = m_ppmDtc->participantPosition(partId);
QString mgrsStr = LtsCoordTrans::mgrsFromGeographic(pos.pos().lon(), pos.pos().lat());
INFO_LOG() << " for partId = '" << partId << "', we got position: " << mgrsStr;
INFO_LOG(m_logger) << " for partId = '" << partId << "', we got position: " << mgrsStr;
return mgrsStr == QStringLiteral("32U PD 76900 18100");
}
@@ -392,17 +392,17 @@ int ModuleTestAesOthers::doMoveParticipant(int participantId, const QString &new
QPointF pos = utmPos.geographic();
req.position(Core::GeoPosition(pos.x(), pos.y(), 0.0));
INFO_LOG() << " setSimulatedPositionRequest ...";
INFO_LOG(m_logger) << " setSimulatedPositionRequest ...";
m_replyError = true;
m_ppmFtc->setSimulatedPositionRequest(req, this);
// expected condition:
if (!waitForData([this]() { return m_replyError == false; }))
{
ERROR_LOG() << "Error on request";
ERROR_LOG(m_logger) << "Error on request";
}
}
INFO_LOG() << " doMoveParticipant ...DONE";
INFO_LOG(m_logger) << " doMoveParticipant ...DONE";
return true;
}
@@ -423,14 +423,14 @@ void ModuleTestAesOthers::initTestCase()
QVERIFY2(bInit, "ERROR, ddsConnector.init failed!!");
if (!bInit)
{
ERROR_LOG() << " ERROR, ddsConnector.init failed!!";
ERROR_LOG(m_logger) << " ERROR, ddsConnector.init failed!!";
return;
}
INFO_LOG() << " ddsConnector.init successfull";
INFO_LOG(m_logger) << " ddsConnector.init successfull";
// cmd
m_ddsConnector->initPublisherSubscriber();
INFO_LOG() << " ddsConnector.initPublisherSubscriber done";
INFO_LOG(m_logger) << " ddsConnector.initPublisherSubscriber done";
//
// Aes
@@ -610,7 +610,7 @@ void ModuleTestAesOthers::test_boobyTrap_02_IMPL(const QString &name,
return;
}
INFO_LOG() << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId
INFO_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId
<< ", name =" << name << "'"
<< ", impactCoord= " << impactCoord.mgrs()
<< ", rotationAngle = " << rotationAngle
@@ -666,7 +666,7 @@ void ModuleTestAesOthers::test_boobyTrap_02_IMPL(const QString &name,
// wait to let it disappear:
waitForData([]() { return false; }, 15);
INFO_LOG() << Q_FUNC_INFO << " END"
INFO_LOG(m_logger) << Q_FUNC_INFO << " END"
<< ", name =" << name << "'"
<< ", impactCoord= " << impactCoord.mgrs()
<< ", rotationAngle = " << rotationAngle
@@ -713,7 +713,7 @@ void ModuleTestAesOthers::test_offRouteMine_02()
return;
}
INFO_LOG() << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
INFO_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
QVERIFY2(checkParticipant_18(), "ERROR, checkParticipant_5 failed!!");
@@ -767,7 +767,7 @@ void ModuleTestAesOthers::test_offRouteMine_02()
// wait to let it disappear:
waitForData([]() { return false; }, 15);
INFO_LOG() << Q_FUNC_INFO << " END" << ", name =" << orm.name() << "'";
INFO_LOG(m_logger) << Q_FUNC_INFO << " END" << ", name =" << orm.name() << "'";
}
void ModuleTestAesOthers::cleanupTestCase()
@@ -775,9 +775,9 @@ void ModuleTestAesOthers::cleanupTestCase()
// finish last (dds) calls:
waitForData([]() { return false; }, 10);
INFO_LOG() << " ddsConnector destroy...";
INFO_LOG(m_logger) << " ddsConnector destroy...";
m_ddsConnector.reset();
INFO_LOG() << " ddsConnector destroy...DONE";
INFO_LOG(m_logger) << " ddsConnector destroy...DONE";
}
@@ -54,6 +54,8 @@ public:
ModuleTestAesOthers(int domainId, int exerciseId);
protected:
NGL::INGLLogger &m_logger;
void onSetSimulatedPositionReply(const Core::FunctionReplyObject &replyObject) override;
void onBoobyTrapModifyReply(const Core::FunctionReplyObject &replyObject) override;