Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+95
-95
@@ -63,7 +63,7 @@ IsmTests::~IsmTests()
|
||||
// ------------------------------------------------------------------------------
|
||||
bool IsmTests::init(int domainId, int testId, int assetId, int mainStructureElementId, int structureElementId, int indexNo)
|
||||
{
|
||||
INFO_LOG() << "init begin";
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
m_assetId = assetId;
|
||||
@@ -81,30 +81,30 @@ bool IsmTests::init(int domainId, int testId, int assetId, int mainStructureElem
|
||||
m_dbHandler = std::make_shared<DbHandler>();
|
||||
if(!m_dbHandler->init(0, Settings::settings()))
|
||||
{
|
||||
ERROR_LOG() << "Initialisation dbHandler failed.";
|
||||
ERROR_LOG(m_logger) << "Initialisation dbHandler failed.";
|
||||
return false;
|
||||
}
|
||||
DEBUG_LOG() << "Initialisation dbHandler succesful.";
|
||||
DEBUG_LOG(m_logger) << "Initialisation dbHandler succesful.";
|
||||
m_db = m_dbHandler->db();
|
||||
|
||||
TRACE_LOG() << "create dtc";
|
||||
TRACE_LOG(m_logger) << "create dtc";
|
||||
m_dtc = InfrastructureManagement::Interface::Dtc::create(m_ddsConnector);
|
||||
TRACE_LOG() << "init dtc";
|
||||
TRACE_LOG(m_logger) << "init dtc";
|
||||
bool bRet = m_dtc->enableAll();
|
||||
TRACE_LOG() << "init dtc end - bRet = " << bRet;
|
||||
TRACE_LOG(m_logger) << "init dtc end - bRet = " << bRet;
|
||||
|
||||
TRACE_LOG() << "create ftc";
|
||||
TRACE_LOG(m_logger) << "create ftc";
|
||||
m_ftc = InfrastructureManagement::Interface::Ftc::create(m_ddsConnector);
|
||||
TRACE_LOG() << "init ftc";
|
||||
TRACE_LOG(m_logger) << "init ftc";
|
||||
bRet &= m_ftc->enableAll();
|
||||
TRACE_LOG() << "init ftc end - bRet = " << bRet;
|
||||
TRACE_LOG(m_logger) << "init ftc end - bRet = " << bRet;
|
||||
|
||||
DEBUG_LOG() << "########### Domain Id = " << domainId;
|
||||
DEBUG_LOG() << "########### Test Id = " << testId;
|
||||
DEBUG_LOG() << "########### Asset Id = " << assetId;
|
||||
DEBUG_LOG() << "########### Main Structure Element Id = " << mainStructureElementId;
|
||||
DEBUG_LOG() << "########### Structure Element Id = " << structureElementId;
|
||||
DEBUG_LOG() << "########### Index No = " << indexNo;
|
||||
DEBUG_LOG(m_logger) << "########### Domain Id = " << domainId;
|
||||
DEBUG_LOG(m_logger) << "########### Test Id = " << testId;
|
||||
DEBUG_LOG(m_logger) << "########### Asset Id = " << assetId;
|
||||
DEBUG_LOG(m_logger) << "########### Main Structure Element Id = " << mainStructureElementId;
|
||||
DEBUG_LOG(m_logger) << "########### Structure Element Id = " << structureElementId;
|
||||
DEBUG_LOG(m_logger) << "########### Index No = " << indexNo;
|
||||
|
||||
return bRet;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ bool IsmTests::init(int domainId, int testId, int assetId, int mainStructureElem
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::startTest()
|
||||
{
|
||||
INFO_LOG() << "********* startTest **************";
|
||||
INFO_LOG(m_logger) << "********* startTest **************";
|
||||
// main structure elements
|
||||
switch (m_testId)
|
||||
{
|
||||
@@ -179,7 +179,7 @@ void IsmTests::startTest()
|
||||
failExit();
|
||||
break;
|
||||
}
|
||||
INFO_LOG() << "********* endTest **************";
|
||||
INFO_LOG(m_logger) << "********* endTest **************";
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ static void addElementToRequest(MainStructureElementModifyRequest &request,
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCreateMainStructureElement()
|
||||
{
|
||||
INFO_LOG() << "trying to send MainStructureElementCreateRequest";
|
||||
INFO_LOG(m_logger) << "trying to send MainStructureElementCreateRequest";
|
||||
|
||||
MainStructureElementModifyRequest data;
|
||||
|
||||
@@ -443,7 +443,7 @@ void IsmTests::tryCreateMainStructureElement()
|
||||
|
||||
// if (!m_ftc->mainStructureElementModifyRequest(data, this))
|
||||
// {
|
||||
// ERROR_LOG() << "Error requesting create data (building)";
|
||||
// ERROR_LOG(m_logger) << "Error requesting create data (building)";
|
||||
// failExit();
|
||||
// }
|
||||
|
||||
@@ -453,18 +453,18 @@ void IsmTests::tryCreateMainStructureElement()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryModifyMainStructureElement()
|
||||
{
|
||||
INFO_LOG() << "trying to send MainStructureElementModifyRequest ";
|
||||
INFO_LOG(m_logger) << "trying to send MainStructureElementModifyRequest ";
|
||||
m_dtc->waitForHistoricalDataMainStructureElement();
|
||||
InfrastructureManagement::MainStructureElement mse = m_dtc->mainStructureElement(m_mainStructureElementId);
|
||||
InfrastructureManagement::MainStructureElementModifyRequest data;
|
||||
|
||||
if (mse.id() == 0)
|
||||
{
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "Modify MainStructureElement with id = " << mse.id();
|
||||
DEBUG_LOG(m_logger) << "Modify MainStructureElement with id = " << mse.id();
|
||||
|
||||
// creating ModifyRequest
|
||||
data.id(mse.id());
|
||||
@@ -484,7 +484,7 @@ void IsmTests::tryModifyMainStructureElement()
|
||||
m_replyFinished = false;
|
||||
if (!m_ftc->mainStructureElementModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@ void IsmTests::tryModifyMainStructureElement()
|
||||
for (size_t i = 0; i < mse.elements().size(); ++i)
|
||||
{
|
||||
se = mse.elements().at(i);
|
||||
DEBUG_LOG() << "Updating barcode for element (" << i << ") with old barcode = " << se.barcode();
|
||||
DEBUG_LOG(m_logger) << "Updating barcode for element (" << i << ") with old barcode = " << se.barcode();
|
||||
|
||||
se.barcode("BARCODE");
|
||||
seData.elements().push_back(se);
|
||||
@@ -508,7 +508,7 @@ void IsmTests::tryModifyMainStructureElement()
|
||||
|
||||
if (!m_ftc->structureElementModifyRequest(seData, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -518,20 +518,20 @@ void IsmTests::tryModifyMainStructureElement()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryRemoveMainStructureElement()
|
||||
{
|
||||
INFO_LOG() << "trying to send MainStructureElementRemoveRequest for mse id = " << m_mainStructureElementId;
|
||||
INFO_LOG(m_logger) << "trying to send MainStructureElementRemoveRequest for mse id = " << m_mainStructureElementId;
|
||||
|
||||
m_dtc->waitForHistoricalDataMainStructureElement();
|
||||
InfrastructureManagement::MainStructureElement mse = m_dtc->mainStructureElement(m_mainStructureElementId);
|
||||
|
||||
if (mse.id() == 0)
|
||||
{
|
||||
ERROR_LOG() << "Cannot find main structure element with id = " << m_mainStructureElementId;
|
||||
ERROR_LOG(m_logger) << "Cannot find main structure element with id = " << m_mainStructureElementId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
if (!m_ftc->mainStructureElementRemoveRequest(MainStructureElementRemoveRequest(m_mainStructureElementId), this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting delete data";
|
||||
ERROR_LOG(m_logger) << "Error requesting delete data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -541,7 +541,7 @@ void IsmTests::tryRemoveMainStructureElement()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCreateBridge()
|
||||
{
|
||||
INFO_LOG() << "trying to send MainStructureElementCreateRequest";
|
||||
INFO_LOG(m_logger) << "trying to send MainStructureElementCreateRequest";
|
||||
|
||||
MainStructureElementModifyRequest data;
|
||||
|
||||
@@ -574,7 +574,7 @@ void IsmTests::tryCreateBridge()
|
||||
|
||||
if (!m_ftc->mainStructureElementModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data (bridge)";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data (bridge)";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -585,18 +585,18 @@ void IsmTests::tryCreateBridge()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryChangeBridgeStatus()
|
||||
{
|
||||
INFO_LOG() << "trying to send MainStructureElementModifyBridgeStatusRequest ";
|
||||
INFO_LOG(m_logger) << "trying to send MainStructureElementModifyBridgeStatusRequest ";
|
||||
m_dtc->waitForHistoricalDataMainStructureElement();
|
||||
InfrastructureManagement::MainStructureElement mse = m_dtc->mainStructureElement(m_mainStructureElementId);
|
||||
InfrastructureManagement::MainStructureElementModifyBridgeStatusRequest data;
|
||||
|
||||
if (mse.id() == 0)
|
||||
{
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "Modify MainStructureElement with id = " << mse.id();
|
||||
DEBUG_LOG(m_logger) << "Modify MainStructureElement with id = " << mse.id();
|
||||
|
||||
// creating ModifyRequest
|
||||
data.id(mse.id());
|
||||
@@ -608,7 +608,7 @@ void IsmTests::tryChangeBridgeStatus()
|
||||
m_replyFinished = false;
|
||||
if (!m_ftc->mainStructureElementModifyBridgeStatusRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting modify bridge status";
|
||||
ERROR_LOG(m_logger) << "Error requesting modify bridge status";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -622,7 +622,7 @@ void IsmTests::tryChangeBridgeStatus()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCreateAsset()
|
||||
{
|
||||
INFO_LOG() << "trying to send AssetCreateRequest";
|
||||
INFO_LOG(m_logger) << "trying to send AssetCreateRequest";
|
||||
|
||||
InstrumentationAssetModifyRequest data;
|
||||
|
||||
@@ -633,7 +633,7 @@ void IsmTests::tryCreateAsset()
|
||||
|
||||
if (!m_ftc->instrumentationAssetModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -646,7 +646,7 @@ void IsmTests::tryCreateAsset()
|
||||
|
||||
if (!m_ftc->instrumentationAssetModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -659,7 +659,7 @@ void IsmTests::tryCreateAsset()
|
||||
|
||||
if (!m_ftc->instrumentationAssetModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -672,7 +672,7 @@ void IsmTests::tryCreateAsset()
|
||||
|
||||
if (!m_ftc->instrumentationAssetModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -683,21 +683,21 @@ void IsmTests::tryCreateAsset()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryModifyAsset()
|
||||
{
|
||||
INFO_LOG() << "trying to send asset modify request ";
|
||||
INFO_LOG(m_logger) << "trying to send asset modify request ";
|
||||
|
||||
DEBUG_LOG() << "m_assetId = " << m_assetId;
|
||||
DEBUG_LOG(m_logger) << "m_assetId = " << m_assetId;
|
||||
|
||||
m_dtc->waitForHistoricalDataInstrumentationAsset();
|
||||
const InfrastructureManagement::InstrumentationAsset &ast = m_dtc->instrumentationAsset(m_assetId);
|
||||
// const InfrastructureManagement::InstrumentationAsset &ast1 = m_dtc->instrumentationAssets()[m_assetId];
|
||||
InfrastructureManagement::InstrumentationAssetModifyRequest data;
|
||||
|
||||
DEBUG_LOG() << "ast.id() = " << ast.id();
|
||||
// DEBUG_LOG() << "ast1.id() = " << ast1.id();
|
||||
DEBUG_LOG(m_logger) << "ast.id() = " << ast.id();
|
||||
// DEBUG_LOG(m_logger) << "ast1.id() = " << ast1.id();
|
||||
|
||||
if (ast.id() == 0)
|
||||
{
|
||||
ERROR_LOG() << "Cannot find Asset Id = " << m_assetId;
|
||||
ERROR_LOG(m_logger) << "Cannot find Asset Id = " << m_assetId;
|
||||
failExit();
|
||||
}
|
||||
else
|
||||
@@ -714,7 +714,7 @@ void IsmTests::tryModifyAsset()
|
||||
|
||||
if (!m_ftc->instrumentationAssetModifyRequest(InstrumentationAssetModifyRequest(data), this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -725,20 +725,20 @@ void IsmTests::tryModifyAsset()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryRemoveAsset()
|
||||
{
|
||||
INFO_LOG() << "trying to send AssetRemoveRequest for id = " << m_assetId;
|
||||
INFO_LOG(m_logger) << "trying to send AssetRemoveRequest for id = " << m_assetId;
|
||||
|
||||
m_dtc->waitForHistoricalDataInstrumentationAsset();
|
||||
const InfrastructureManagement::InstrumentationAsset &ast = m_dtc->instrumentationAsset(m_assetId);
|
||||
|
||||
if (ast.id() == 0)
|
||||
{
|
||||
ERROR_LOG() << "Cannot find Asset Id = " << m_assetId;
|
||||
ERROR_LOG(m_logger) << "Cannot find Asset Id = " << m_assetId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
if (!m_ftc->instrumentationAssetRemoveRequest(InstrumentationAssetRemoveRequest(m_assetId), this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting delete data";
|
||||
ERROR_LOG(m_logger) << "Error requesting delete data";
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
@@ -747,21 +747,21 @@ void IsmTests::tryRemoveAsset()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryUnmountAsset()
|
||||
{
|
||||
INFO_LOG() << "trying to send asset state modify request ";
|
||||
INFO_LOG(m_logger) << "trying to send asset state modify request ";
|
||||
|
||||
DEBUG_LOG() << "m_assetId = " << m_assetId;
|
||||
DEBUG_LOG(m_logger) << "m_assetId = " << m_assetId;
|
||||
|
||||
m_dtc->waitForHistoricalDataInstrumentationAsset();
|
||||
const InfrastructureManagement::InstrumentationAsset &ast = m_dtc->instrumentationAsset(m_assetId);
|
||||
// const InfrastructureManagement::InstrumentationAsset &ast1 = m_dtc->instrumentationAssets()[m_assetId];
|
||||
InfrastructureManagement::InstrumentationAssetSetStateRequest data;
|
||||
|
||||
DEBUG_LOG() << "ast.id() = " << ast.id();
|
||||
// DEBUG_LOG() << "ast1.id() = " << ast1.id();
|
||||
DEBUG_LOG(m_logger) << "ast.id() = " << ast.id();
|
||||
// DEBUG_LOG(m_logger) << "ast1.id() = " << ast1.id();
|
||||
|
||||
if (ast.id() == 0)
|
||||
{
|
||||
ERROR_LOG() << "Cannot find Asset Id = " << m_assetId;
|
||||
ERROR_LOG(m_logger) << "Cannot find Asset Id = " << m_assetId;
|
||||
failExit();
|
||||
}
|
||||
else
|
||||
@@ -771,7 +771,7 @@ void IsmTests::tryUnmountAsset()
|
||||
|
||||
if (!m_ftc->instrumentationAssetSetStateRequest(InstrumentationAssetSetStateRequest(data), this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting set asset state";
|
||||
ERROR_LOG(m_logger) << "Error requesting set asset state";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -783,7 +783,7 @@ void IsmTests::tryUnmountAsset()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCreateMountingPointAsset()
|
||||
{
|
||||
INFO_LOG() << "trying to send AssetCreateRequest";
|
||||
INFO_LOG(m_logger) << "trying to send AssetCreateRequest";
|
||||
|
||||
MountingPointAssetModifyRequest data;
|
||||
|
||||
@@ -793,7 +793,7 @@ void IsmTests::tryCreateMountingPointAsset()
|
||||
|
||||
if (!m_ftc->mountingPointAssetModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -803,20 +803,20 @@ void IsmTests::tryCreateMountingPointAsset()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryRemoveMountingPointAsset()
|
||||
{
|
||||
INFO_LOG() << "trying to send MountingPointAssetRemoveRequest ";
|
||||
INFO_LOG(m_logger) << "trying to send MountingPointAssetRemoveRequest ";
|
||||
|
||||
m_dtc->waitForHistoricalDataMountingPointAsset();
|
||||
if (!m_dtc->getMountingPointAssetId(m_structureElementId, m_assetId, m_mountingPointAssetId))
|
||||
{
|
||||
ERROR_LOG() << "Cannot find requested mounting point asset";
|
||||
ERROR_LOG(m_logger) << "Cannot find requested mounting point asset";
|
||||
failExit();
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "MountingPointAsset Id = " << m_mountingPointAssetId;
|
||||
DEBUG_LOG(m_logger) << "MountingPointAsset Id = " << m_mountingPointAssetId;
|
||||
|
||||
if (!m_ftc->mountingPointAssetRemoveRequest(MountingPointAssetRemoveRequest(m_mountingPointAssetId), this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting delete data";
|
||||
ERROR_LOG(m_logger) << "Error requesting delete data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -827,7 +827,7 @@ void IsmTests::tryRemoveMountingPointAsset()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCreateMainSchedule()
|
||||
{
|
||||
INFO_LOG() << "trying to send MainScheduleCreateRequest";
|
||||
INFO_LOG(m_logger) << "trying to send MainScheduleCreateRequest";
|
||||
|
||||
MainScheduleModifyRequest data0, data1, data2;
|
||||
|
||||
@@ -842,7 +842,7 @@ void IsmTests::tryCreateMainSchedule()
|
||||
|
||||
if (!m_ftc->mainScheduleModifyRequest(data1, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -859,7 +859,7 @@ void IsmTests::tryCreateMainSchedule()
|
||||
|
||||
if (!m_ftc->mainScheduleModifyRequest(data2, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -875,7 +875,7 @@ void IsmTests::tryCreateMainSchedule()
|
||||
|
||||
if (!m_ftc->mainScheduleModifyRequest(data0, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -885,16 +885,16 @@ void IsmTests::tryCreateMainSchedule()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryModifyMainSchedule()
|
||||
{
|
||||
INFO_LOG() << "trying to send mounting point schedule modify request ";
|
||||
INFO_LOG(m_logger) << "trying to send mounting point schedule modify request ";
|
||||
|
||||
m_dtc->waitForHistoricalDataMainSchedule();
|
||||
// using m_assetId as main schedule id
|
||||
InfrastructureManagement::MainSchedule ast = m_dtc->mainSchedule(m_assetId);
|
||||
InfrastructureManagement::MainScheduleModifyRequest data;
|
||||
|
||||
DEBUG_LOG() << "m_assetId = " << m_assetId;
|
||||
DEBUG_LOG(m_logger) << "m_assetId = " << m_assetId;
|
||||
|
||||
DEBUG_LOG() << "ast.id() = " << ast.id();
|
||||
DEBUG_LOG(m_logger) << "ast.id() = " << ast.id();
|
||||
|
||||
// creating ModifyRequest
|
||||
if (ast.id() > 0)
|
||||
@@ -913,13 +913,13 @@ void IsmTests::tryModifyMainSchedule()
|
||||
|
||||
if (!m_ftc->mainScheduleModifyRequest(MainScheduleModifyRequest(data), this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "Cannot find main schedule id = " << m_assetId;
|
||||
ERROR_LOG(m_logger) << "Cannot find main schedule id = " << m_assetId;
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
@@ -928,16 +928,16 @@ void IsmTests::tryModifyMainSchedule()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryChangeStatusSchedule()
|
||||
{
|
||||
INFO_LOG() << "trying to send mounting point schedule modify request ";
|
||||
INFO_LOG(m_logger) << "trying to send mounting point schedule modify request ";
|
||||
|
||||
m_dtc->waitForHistoricalDataMainSchedule();
|
||||
// using m_assetId as main schedule id
|
||||
InfrastructureManagement::MainSchedule ast = m_dtc->mainSchedule(m_assetId);
|
||||
InfrastructureManagement::MainScheduleModifyRequest data;
|
||||
|
||||
DEBUG_LOG() << "m_assetId = " << m_assetId;
|
||||
DEBUG_LOG(m_logger) << "m_assetId = " << m_assetId;
|
||||
|
||||
DEBUG_LOG() << "ast.id() = " << ast.id();
|
||||
DEBUG_LOG(m_logger) << "ast.id() = " << ast.id();
|
||||
|
||||
// creating ModifyRequest
|
||||
if (ast.id() > 0)
|
||||
@@ -974,13 +974,13 @@ void IsmTests::tryChangeStatusSchedule()
|
||||
|
||||
if (!m_ftc->mainScheduleModifyRequest(MainScheduleModifyRequest(data), this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "Cannot find main schedule id = " << m_assetId;
|
||||
ERROR_LOG(m_logger) << "Cannot find main schedule id = " << m_assetId;
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
@@ -989,20 +989,20 @@ void IsmTests::tryChangeStatusSchedule()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryRemoveMainSchedule()
|
||||
{
|
||||
INFO_LOG() << "trying to send MainScheduleRemoveRequest for id = " << m_assetId;
|
||||
INFO_LOG(m_logger) << "trying to send MainScheduleRemoveRequest for id = " << m_assetId;
|
||||
|
||||
m_dtc->waitForHistoricalDataMainSchedule();
|
||||
InfrastructureManagement::MainSchedule ast = m_dtc->mainSchedule(m_assetId);
|
||||
|
||||
if (ast.id() == 0)
|
||||
{
|
||||
ERROR_LOG() << "Cannot find main schedule id = " << m_assetId;
|
||||
ERROR_LOG(m_logger) << "Cannot find main schedule id = " << m_assetId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
if (!m_ftc->mainScheduleRemoveRequest(MainScheduleRemoveRequest(m_assetId), this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting delete data";
|
||||
ERROR_LOG(m_logger) << "Error requesting delete data";
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
@@ -1011,20 +1011,20 @@ void IsmTests::tryRemoveMainSchedule()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCopySchedule()
|
||||
{
|
||||
INFO_LOG() << "trying to copy schedule";
|
||||
INFO_LOG(m_logger) << "trying to copy schedule";
|
||||
|
||||
m_dtc->waitForHistoricalDataMainSchedule();
|
||||
// using m_assetId as main schedule id
|
||||
InfrastructureManagement::MainSchedule ms = m_dtc->mainSchedule(m_assetId);
|
||||
|
||||
DEBUG_LOG() << "scheduleId = " << m_assetId;
|
||||
DEBUG_LOG() << "ms.id() = " << ms.id();
|
||||
DEBUG_LOG(m_logger) << "scheduleId = " << m_assetId;
|
||||
DEBUG_LOG(m_logger) << "ms.id() = " << ms.id();
|
||||
|
||||
int newId = m_db->copySchedule(ms.id());
|
||||
|
||||
if (newId <= 0)
|
||||
{
|
||||
ERROR_LOG() << "Error copy schedule, code = " << newId;
|
||||
ERROR_LOG(m_logger) << "Error copy schedule, code = " << newId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -1034,26 +1034,26 @@ void IsmTests::tryCopySchedule()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::checkSchedule()
|
||||
{
|
||||
ERROR_LOG() << "check instrumentation plan";
|
||||
ERROR_LOG(m_logger) << "check instrumentation plan";
|
||||
|
||||
m_dtc->waitForHistoricalDataMainSchedule();
|
||||
|
||||
// using m_assetId as main schedule id
|
||||
InfrastructureManagement::MainSchedule ms = m_dtc->mainSchedule(m_assetId);
|
||||
|
||||
DEBUG_LOG() << "scheduleId = " << m_assetId;
|
||||
DEBUG_LOG() << "ms.id() = " << ms.id();
|
||||
DEBUG_LOG(m_logger) << "scheduleId = " << m_assetId;
|
||||
DEBUG_LOG(m_logger) << "ms.id() = " << ms.id();
|
||||
|
||||
QList<MountingPointPlan> diff;
|
||||
bool ok = m_dtc->getScheduleDifferences(m_assetId, diff);
|
||||
|
||||
if (ok)
|
||||
ERROR_LOG() << "Instrumentation plan complete!";
|
||||
ERROR_LOG(m_logger) << "Instrumentation plan complete!";
|
||||
else
|
||||
{
|
||||
ERROR_LOG() << "Instrumentation plan not complete !!!";
|
||||
ERROR_LOG(m_logger) << "Instrumentation plan not complete !!!";
|
||||
for (const MountingPointPlan &mpp : std::as_const(diff))
|
||||
ERROR_LOG() << "Diff - # mpp.structureElementId() = " << mpp.structureElementId();
|
||||
ERROR_LOG(m_logger) << "Diff - # mpp.structureElementId() = " << mpp.structureElementId();
|
||||
}
|
||||
|
||||
QTest::qWait(1000);
|
||||
@@ -1064,7 +1064,7 @@ void IsmTests::checkSchedule()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::tryCreateMountingPointPlan()
|
||||
{
|
||||
INFO_LOG() << "trying to send MountingPointPlanCreateRequest";
|
||||
INFO_LOG(m_logger) << "trying to send MountingPointPlanCreateRequest";
|
||||
|
||||
MountingPointPlanModifyRequest data;
|
||||
|
||||
@@ -1074,7 +1074,7 @@ void IsmTests::tryCreateMountingPointPlan()
|
||||
|
||||
if (!m_ftc->mountingPointPlanModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -1086,7 +1086,7 @@ void IsmTests::tryCreateMountingPointPlan()
|
||||
|
||||
if (!m_ftc->mountingPointPlanModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -1098,7 +1098,7 @@ void IsmTests::tryCreateMountingPointPlan()
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::onError(const QString &reason)
|
||||
{
|
||||
ERROR_LOG() << "Got Reply error: " << reason;
|
||||
ERROR_LOG(m_logger) << "Got Reply error: " << reason;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -1110,7 +1110,7 @@ void IsmTests::onCreateReply(const Core::FunctionReplyObject &replyObject)
|
||||
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);
|
||||
}
|
||||
@@ -1124,7 +1124,7 @@ void IsmTests::onModifyReply(const Core::FunctionReplyObject &replyObject)
|
||||
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);
|
||||
}
|
||||
@@ -1137,7 +1137,7 @@ void IsmTests::onRemoveReply(const Core::FunctionReplyObject &replyObject)
|
||||
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);
|
||||
}
|
||||
@@ -1145,7 +1145,7 @@ void IsmTests::onRemoveReply(const Core::FunctionReplyObject &replyObject)
|
||||
// ------------------------------------------------------------------------------
|
||||
void IsmTests::failExit()
|
||||
{
|
||||
ERROR_LOG() << "FAIL EXIT !";
|
||||
ERROR_LOG(m_logger) << "FAIL EXIT !";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user