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

@@ -42,7 +42,7 @@ OpmTests::~OpmTests()
//-----------------------------------------------------------------------------
bool OpmTests::init(int domainId, int exerciseId, int testId, int operatorId, int createdId)
{
INFO_LOG() << "OpmTests::init() "
INFO_LOG(m_logger) << "OpmTests::init() "
<< " domainId:" << domainId
<< " exerciseId:" << exerciseId
<< " testId: " << testId
@@ -61,18 +61,18 @@ bool OpmTests::init(int domainId, int exerciseId, int testId, int operatorId, in
m_ddsConnector->initPublisherSubscriber();
// Access to FTC
DEBUG_LOG() << "create ftc";
DEBUG_LOG(m_logger) << "create ftc";
m_ftc = OperatorManagement::Interface::Ftc::create(m_ddsConnector);
DEBUG_LOG() << "init ftc";
DEBUG_LOG(m_logger) << "init ftc";
bool bRet = m_ftc->enableAll();
DEBUG_LOG() << "init end - bRet = " << bRet;
DEBUG_LOG(m_logger) << "init end - bRet = " << bRet;
// Access to DTC
DEBUG_LOG() << "create dtc";
DEBUG_LOG(m_logger) << "create dtc";
m_dtc = OperatorManagement::Interface::Dtc::create(m_ddsConnector);
DEBUG_LOG() << "init dtc";
DEBUG_LOG(m_logger) << "init dtc";
bRet = m_dtc->enableAll();
DEBUG_LOG() << "init end - bRet = " << bRet;
DEBUG_LOG(m_logger) << "init end - bRet = " << bRet;
connect(m_dtc.get(), &Interface::Dtc::userChanged,
this, &OpmTests::onReceiveOperatorChanged);
@@ -86,7 +86,7 @@ bool OpmTests::init(int domainId, int exerciseId, int testId, int operatorId, in
//-----------------------------------------------------------------------------
void OpmTests::startTest()
{
INFO_LOG() << "startTest() exerciseId:" << m_exerciseId
INFO_LOG(m_logger) << "startTest() exerciseId:" << m_exerciseId
<< " testId:" << m_testId
<< " operatorId:" << m_operatorId
;
@@ -121,10 +121,10 @@ void OpmTests::tryCreate()
OperatorCreateModifyRequest data;
getOperatorCreateRequestData( data);
INFO_LOG() << "trying to send OperatorCreateRequest";
INFO_LOG(m_logger) << "trying to send OperatorCreateRequest";
if (!m_ftc->operatorCreateModifyRequest(data, this))
{
ERROR_LOG() << "Error requesting create data";
ERROR_LOG(m_logger) << "Error requesting create data";
failExit();
}
QTest::qWait(1000);
@@ -137,10 +137,10 @@ void OpmTests::tryModify()
OperatorCreateModifyRequest data;
getOperatorModifyRequestData(data);
INFO_LOG() << "trying to send OperatorCreateModifyRequest";
INFO_LOG(m_logger) << "trying to send OperatorCreateModifyRequest";
if (!m_ftc->operatorCreateModifyRequest(data, this))
{
ERROR_LOG() << "Error requesting modify data";
ERROR_LOG(m_logger) << "Error requesting modify data";
failExit();
}
QTest::qWait(1000);
@@ -154,10 +154,10 @@ void OpmTests::tryRemove()
data.id(m_operatorId);
INFO_LOG() << "trying to send remove request";
INFO_LOG(m_logger) << "trying to send remove request";
if (!m_ftc->operatorRemoveRequest(data, this))
{
ERROR_LOG() << "Error requesting remove data";
ERROR_LOG(m_logger) << "Error requesting remove data";
failExit();
}
QTest::qWait(1000);
@@ -190,7 +190,7 @@ void OpmTests::tryLogin()
<< ", force:" << data.force();
if (!m_ftc->operatorLoginRequest(data, this))
{
ERROR_LOG() << "Error login operator id " << m_operatorId << " on workstation 1";
ERROR_LOG(m_logger) << "Error login operator id " << m_operatorId << " on workstation 1";
failExit();
}
QTest::qWait(1000);
@@ -213,10 +213,10 @@ void OpmTests::tryLoginForce()
data.workstationId(4);
data.force(true);
INFO_LOG() << "trying to send OperatorLoginRequest";
INFO_LOG(m_logger) << "trying to send OperatorLoginRequest";
if (!m_ftc->operatorLoginRequest(data, this))
{
ERROR_LOG() << "Error login operator id " << m_operatorId << " on workstation 1";
ERROR_LOG(m_logger) << "Error login operator id " << m_operatorId << " on workstation 1";
failExit();
}
QTest::qWait(1000);
@@ -230,10 +230,10 @@ void OpmTests::tryLogout()
data.id(m_operatorId);
INFO_LOG() << "trying to send OperatorLogoutRequest";
INFO_LOG(m_logger) << "trying to send OperatorLogoutRequest";
if (!m_ftc->operatorLogoutRequest(data, this))
{
ERROR_LOG() << "Error logout operator id " << m_operatorId;
ERROR_LOG(m_logger) << "Error logout operator id " << m_operatorId;
failExit();
}
QTest::qWait(1000);
@@ -246,18 +246,18 @@ void OpmTests::tryGetOperatorsByOperatorRight()
int operatorRight = OperatorRights::CContaminationsEdit;
m_dtc->waitForHistoricalDataUser();
INFO_LOG() << "trying to send get operators by operatorRight";
INFO_LOG(m_logger) << "trying to send get operators by operatorRight";
QVector<int> operators = m_dtc->getOperatorsByOperatorRight(operatorRight);
if (operators.empty())
{
ERROR_LOG() << "Error no operators for operatorRight: " << operatorRight;
ERROR_LOG(m_logger) << "Error no operators for operatorRight: " << operatorRight;
failExit();
}
else
{
for (int operatorId : operators)
{
INFO_LOG() << "Operator " << operatorId << " found.";
INFO_LOG(m_logger) << "Operator " << operatorId << " found.";
}
}
QTest::qWait(1000);
@@ -266,22 +266,22 @@ void OpmTests::tryGetOperatorsByOperatorRight()
void OpmTests::tryGetAllOperators()
{
m_eTestStep = eGetAllOperators;
DEBUG_LOG() << "trying to get all operators";
DEBUG_LOG(m_logger) << "trying to get all operators";
m_dtc->waitForHistoricalDataUser();
const QMap<qint32, OperatorManagement::User> opMap = m_dtc->users();
if(opMap.isEmpty())
{
ERROR_LOG() << "Error requesting all operator data";
ERROR_LOG(m_logger) << "Error requesting all operator data";
failExit();
}
else
{
INFO_LOG() << "Amout of existing operators = " << opMap.size();
INFO_LOG(m_logger) << "Amout of existing operators = " << opMap.size();
m_operatorId = opMap.firstKey();
for(auto it = opMap.begin(); it != opMap.end(); ++it)
{
INFO_LOG() << "opm(" << it.key() << ") :"
INFO_LOG(m_logger) << "opm(" << it.key() << ") :"
<< " name:" << it.value().name()
// << " password:" << it.value().password()
// << " effectiveACLs:" << it.value().effectiveAcls()
@@ -294,7 +294,7 @@ void OpmTests::tryGetAllOperators()
//-----------------------------------------------------------------------------
void OpmTests::tryGetOperator()
{
DEBUG_LOG() << "trying to get operator with id:" << m_operatorId;
DEBUG_LOG(m_logger) << "trying to get operator with id:" << m_operatorId;
if(m_testId > 1)
{
@@ -303,7 +303,7 @@ void OpmTests::tryGetOperator()
if(m_operatorId <= 0)
{
ERROR_LOG() << "invalid operatorId - test aborted.";
ERROR_LOG(m_logger) << "invalid operatorId - test aborted.";
failExit();
}
@@ -312,12 +312,12 @@ void OpmTests::tryGetOperator()
if(op.id() <= 0)
{
ERROR_LOG() << "Error receiving data for operatorId " << m_operatorId << " returnVal:" << op.id();
ERROR_LOG(m_logger) << "Error receiving data for operatorId " << m_operatorId << " returnVal:" << op.id();
failExit();
}
else
{
INFO_LOG() << "opm(" << op.id() << ") :"
INFO_LOG(m_logger) << "opm(" << op.id() << ") :"
<< " name: " << op.name()
// << " password: " << data.password()
// << " effectiveACLs:" << it.value().effectiveAcls()
@@ -330,7 +330,7 @@ void OpmTests::tryGetOperator()
{
if(! onCompareCreatedData(op))
{
ERROR_LOG() << "Compare created data failed!";
ERROR_LOG(m_logger) << "Compare created data failed!";
failExit();
}
else
@@ -343,7 +343,7 @@ void OpmTests::tryGetOperator()
{
if(! onCompareModifiedData(op))
{
ERROR_LOG() << "Compare modified data failed!";
ERROR_LOG(m_logger) << "Compare modified data failed!";
failExit();
}
else
@@ -363,20 +363,20 @@ void OpmTests::tryGetOperator()
//-----------------------------------------------------------------------------
void OpmTests::onOperatorCreateModifyReply(const Core::FunctionReplyObject &replyObject)
{
INFO_LOG() << "Got create/modifyReply with id " << replyObject.id()
INFO_LOG(m_logger) << "Got create/modifyReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
m_operatorId = replyObject.id();
if(replyObject.error())
{
ERROR_LOG() << "Error requesting create/modify data";
ERROR_LOG(m_logger) << "Error requesting create/modify data";
failExit();
return;
}
else
{
DEBUG_LOG() << "Requesting create/modify data ok. Got id:" << replyObject.id() << " ... ok.";
DEBUG_LOG(m_logger) << "Requesting create/modify data ok. Got id:" << replyObject.id() << " ... ok.";
}
if(m_testId == 0)
@@ -394,23 +394,23 @@ void OpmTests::onOperatorCreateModifyReply(const Core::FunctionReplyObject &repl
//-----------------------------------------------------------------------------
void OpmTests::onOperatorRemoveReply(const Core::FunctionReplyObject &replyObject)
{
INFO_LOG() << "Got removeReply with id " << replyObject.id()
INFO_LOG(m_logger) << "Got removeReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
if(replyObject.error())
{
ERROR_LOG() << "Error requesting remove data for id:" << replyObject.id();
ERROR_LOG(m_logger) << "Error requesting remove data for id:" << replyObject.id();
failExit();
return;
}
else
{
DEBUG_LOG() << "Requesting remove data for id:" << replyObject.id() << " ... ok.";
DEBUG_LOG(m_logger) << "Requesting remove data for id:" << replyObject.id() << " ... ok.";
}
if(m_testId == 0)
{
INFO_LOG() << "***** FTC/DTC test successfully finished. (used id:" << replyObject.id() << ") *****";
INFO_LOG(m_logger) << "***** FTC/DTC test successfully finished. (used id:" << replyObject.id() << ") *****";
// ansonsten verheriger Ausstieg mit Errorlog.
}
@@ -421,12 +421,12 @@ void OpmTests::onOperatorRemoveReply(const Core::FunctionReplyObject &replyObjec
//-----------------------------------------------------------------------------
void OpmTests::onOperatorLoginReply(const Core::FunctionReplyObject &replyObject)
{
DEBUG_LOG() << "Got loginReply with id " << replyObject.id()
DEBUG_LOG(m_logger) << "Got loginReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
if(replyObject.error())
{
ERROR_LOG() << "Error requesting login for id:" << replyObject.id();
ERROR_LOG(m_logger) << "Error requesting login for id:" << replyObject.id();
failExit();
return;
}
@@ -437,12 +437,12 @@ void OpmTests::onOperatorLoginReply(const Core::FunctionReplyObject &replyObject
//-----------------------------------------------------------------------------
void OpmTests::onOperatorLogoutReply(const Core::FunctionReplyObject &replyObject)
{
INFO_LOG() << "Got logoutReply with id " << replyObject.id()
INFO_LOG(m_logger) << "Got logoutReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
if(replyObject.error())
{
ERROR_LOG() << "Error requesting logout for id:" << replyObject.id();
ERROR_LOG(m_logger) << "Error requesting logout for id:" << replyObject.id();
failExit();
return;
}
@@ -456,8 +456,8 @@ void OpmTests::onReceiveOperatorChanged(const User &data, DataModification modTy
// Check signal/slot connection
if (m_operatorId == data.id())
{
TRACE_LOG() << "Check signal/slot connection for DTC. Data for id = " << data.id() << " received";
TRACE_LOG() << "ModificationType: = " << (int)modType << " received";
TRACE_LOG(m_logger) << "Check signal/slot connection for DTC. Data for id = " << data.id() << " received";
TRACE_LOG(m_logger) << "ModificationType: = " << (int)modType << " received";
}
} // end of onReceiveOperatorData()
@@ -467,8 +467,8 @@ void OpmTests::onReceiveGroupChanged(const Group &data, DataModification modType
// Check signal/slot connection
// if (m_operatorId == data.id())
// {
TRACE_LOG() << "Check signal/slot connection for DTC. Data for id = " << data.id() << " received";
TRACE_LOG() << "ModificationType: = " << (int)modType << " received";
TRACE_LOG(m_logger) << "Check signal/slot connection for DTC. Data for id = " << data.id() << " received";
TRACE_LOG(m_logger) << "ModificationType: = " << (int)modType << " received";
// }
} // end of onReceiveOperatorData()
@@ -513,7 +513,7 @@ void OpmTests::getOperatorModifyRequestData(OperatorCreateModifyRequest &data) c
//-----------------------------------------------------------------------------
bool OpmTests::onCompareCreatedData(User &data)
{
DEBUG_LOG() << "start onCompareCreatedData() for id :" << data.id();
DEBUG_LOG(m_logger) << "start onCompareCreatedData() for id :" << data.id();
OperatorCreateModifyRequest createData;
@@ -528,7 +528,7 @@ bool OpmTests::onCompareCreatedData(User &data)
if (data.description() != createData.description())
return false;
DEBUG_LOG() << "successfull finished onCompareCreatedData() for id :" << data.id();
DEBUG_LOG(m_logger) << "successfull finished onCompareCreatedData() for id :" << data.id();
return true;
} // end of onCompareCreatedData()
@@ -536,7 +536,7 @@ bool OpmTests::onCompareCreatedData(User &data)
//-----------------------------------------------------------------------------
bool OpmTests::onCompareModifiedData(User &data)
{
DEBUG_LOG() << "start onCompareModifiedData() for id :" << data.id();
DEBUG_LOG(m_logger) << "start onCompareModifiedData() for id :" << data.id();
OperatorCreateModifyRequest modifyData;
@@ -551,7 +551,7 @@ bool OpmTests::onCompareModifiedData(User &data)
if (data.description() != modifyData.description())
return false;
DEBUG_LOG() << "successfully finished onCompareModifiedData() for id :" << data.id();
DEBUG_LOG(m_logger) << "successfully finished onCompareModifiedData() for id :" << data.id();
return true;
} // end of onCompareModifiedData()