Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+91
-91
@@ -65,7 +65,7 @@ FlmTests::~FlmTests()
|
||||
// ------------------------------------------------------------------------------
|
||||
bool FlmTests::init(int domainId, int testId, int folderId, int fileContentId, int operatorId)
|
||||
{
|
||||
INFO_LOG() << "init begin";
|
||||
INFO_LOG(m_logger) << "init begin";
|
||||
|
||||
m_testId = testId;
|
||||
m_folderId = folderId;
|
||||
@@ -79,33 +79,33 @@ bool FlmTests::init(int domainId, int testId, int folderId, int fileContentId, i
|
||||
return false;
|
||||
m_ddsConnector->initPublisherSubscriber();
|
||||
|
||||
TRACE_LOG() << "create dtc";
|
||||
TRACE_LOG(m_logger) << "create dtc";
|
||||
m_dtc = FileManagement::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 = FileManagement::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;
|
||||
|
||||
// initialize database
|
||||
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();
|
||||
|
||||
DEBUG_LOG() << "########### Domain Id = " << domainId;
|
||||
DEBUG_LOG() << "########### Test Id = " << testId;
|
||||
DEBUG_LOG() << "########### Folder Id = " << folderId;
|
||||
DEBUG_LOG() << "########### File Content Id = " << fileContentId;
|
||||
DEBUG_LOG() << "########### Operator Id = " << operatorId;
|
||||
DEBUG_LOG(m_logger) << "########### Domain Id = " << domainId;
|
||||
DEBUG_LOG(m_logger) << "########### Test Id = " << testId;
|
||||
DEBUG_LOG(m_logger) << "########### Folder Id = " << folderId;
|
||||
DEBUG_LOG(m_logger) << "########### File Content Id = " << fileContentId;
|
||||
DEBUG_LOG(m_logger) << "########### Operator Id = " << operatorId;
|
||||
|
||||
return bRet;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ bool FlmTests::init(int domainId, int testId, int folderId, int fileContentId, i
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::startTest()
|
||||
{
|
||||
INFO_LOG() << "********* startTest **************";
|
||||
INFO_LOG(m_logger) << "********* startTest **************";
|
||||
switch (m_testId)
|
||||
{
|
||||
// folder
|
||||
@@ -168,11 +168,11 @@ void FlmTests::startTest()
|
||||
tryCreateSymbol();
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG() << "Unknown test case !";
|
||||
ERROR_LOG(m_logger) << "Unknown test case !";
|
||||
failExit();
|
||||
break;
|
||||
}
|
||||
INFO_LOG() << "********* endTest **************";
|
||||
INFO_LOG(m_logger) << "********* endTest **************";
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
@@ -181,13 +181,13 @@ void FlmTests::startTest()
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryCreateFolder()
|
||||
{
|
||||
INFO_LOG() << "trying to send FolderCreateRequest";
|
||||
INFO_LOG(m_logger) << "trying to send FolderCreateRequest";
|
||||
|
||||
int parentFolderId = m_folderId;
|
||||
if (parentFolderId == 0)
|
||||
parentFolderId = 1;
|
||||
|
||||
DEBUG_LOG() << "Creating Folder under folder id = " << parentFolderId;
|
||||
DEBUG_LOG(m_logger) << "Creating Folder under folder id = " << parentFolderId;
|
||||
|
||||
// Creating hidden folder
|
||||
m_folderId = createFolder(parentFolderId, QStringLiteral("Test Folder"), true);
|
||||
@@ -197,7 +197,7 @@ void FlmTests::tryCreateFolder()
|
||||
parentFolderId = m_folderId;
|
||||
m_folderId = 0;
|
||||
|
||||
DEBUG_LOG() << "Creating Subfolder for folder id = " << parentFolderId;
|
||||
DEBUG_LOG(m_logger) << "Creating Subfolder for folder id = " << parentFolderId;
|
||||
|
||||
m_folderId = createFolder(parentFolderId, QStringLiteral("Test Sub Folder"));
|
||||
|
||||
@@ -209,19 +209,19 @@ void FlmTests::tryCreateFolder()
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryModifyFolder()
|
||||
{
|
||||
INFO_LOG() << "trying to send folder modify request ";
|
||||
INFO_LOG(m_logger) << "trying to send folder modify request ";
|
||||
|
||||
DEBUG_LOG() << "m_folderId = " << m_folderId;
|
||||
DEBUG_LOG(m_logger) << "m_folderId = " << m_folderId;
|
||||
|
||||
m_dtc->waitForHistoricalDataFolder();
|
||||
const FileManagement::Folder &fld = m_dtc->folder(m_folderId);
|
||||
FileManagement::FolderModifyRequest data;
|
||||
|
||||
DEBUG_LOG() << "fld.id() = " << fld.id();
|
||||
DEBUG_LOG(m_logger) << "fld.id() = " << fld.id();
|
||||
|
||||
if (fld.id() == 0)
|
||||
{
|
||||
ERROR_LOG() << "Cannot find Folder Id = " << m_folderId;
|
||||
ERROR_LOG(m_logger) << "Cannot find Folder Id = " << m_folderId;
|
||||
failExit();
|
||||
}
|
||||
else
|
||||
@@ -240,7 +240,7 @@ void FlmTests::tryModifyFolder()
|
||||
|
||||
if (!m_ftc->folderModifyRequest(FolderModifyRequest(data), this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
QTRY_VERIFY(m_folderId > 0);
|
||||
@@ -252,11 +252,11 @@ void FlmTests::tryModifyFolder()
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryRemoveFolder()
|
||||
{
|
||||
INFO_LOG() << "trying to send FolderRemoveRequest ";
|
||||
INFO_LOG(m_logger) << "trying to send FolderRemoveRequest ";
|
||||
m_dtc->waitForHistoricalDataFolder();
|
||||
if (!m_ftc->folderRemoveRequest(FolderRemoveRequest(m_folderId), this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting delete data";
|
||||
ERROR_LOG(m_logger) << "Error requesting delete data";
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
@@ -278,7 +278,7 @@ int FlmTests::createFolder(int parentFolderId, const QString &folderName, bool i
|
||||
|
||||
if (!m_ftc->folderModifyRequest(req, this))
|
||||
{
|
||||
ERROR_LOG() << "Error creating folder with parent = " << parentFolderId << " and name = " << folderName ;
|
||||
ERROR_LOG(m_logger) << "Error creating folder with parent = " << parentFolderId << " and name = " << folderName ;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ int FlmTests::createFolder(int parentFolderId, const QString &folderName, bool i
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryCreateFileContent()
|
||||
{
|
||||
INFO_LOG() << "trying to send file content create request ";
|
||||
INFO_LOG(m_logger) << "trying to send file content create request ";
|
||||
m_dtc->waitForHistoricalDataFileContent();
|
||||
|
||||
FileContentModifyRequest data;
|
||||
@@ -313,7 +313,7 @@ void FlmTests::tryCreateFileContent()
|
||||
m_fileContentId = 0;
|
||||
if (!m_ftc->fileContentModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
QTRY_VERIFY(m_fileContentId > 0);
|
||||
@@ -333,7 +333,7 @@ void FlmTests::tryCreateFileContent()
|
||||
m_fileContentId = 0;
|
||||
if (!m_ftc->fileContentModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
QTRY_VERIFY(m_fileContentId > 0);
|
||||
@@ -352,11 +352,11 @@ void FlmTests::tryCreateFileContent()
|
||||
file.setFileName(QCoreApplication::applicationDirPath()+fileName);
|
||||
if (!file.open(QFile::ReadOnly))
|
||||
{
|
||||
ERROR_LOG() << "Error opening file " << fileName;
|
||||
ERROR_LOG(m_logger) << "Error opening file " << fileName;
|
||||
failExit();
|
||||
}
|
||||
QByteArray rawImage = file.readAll();
|
||||
DEBUG_LOG() << "Read file " << fileName;
|
||||
DEBUG_LOG(m_logger) << "Read file " << fileName;
|
||||
file.close();
|
||||
|
||||
data.content(LtsUtils::convert<std::vector<uint8_t>>(rawImage));
|
||||
@@ -364,7 +364,7 @@ void FlmTests::tryCreateFileContent()
|
||||
m_fileContentId = 0;
|
||||
if (!m_ftc->fileContentModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
QTRY_VERIFY(m_fileContentId > 0);
|
||||
@@ -382,11 +382,11 @@ void FlmTests::tryCreateFileContent()
|
||||
file.setFileName(QCoreApplication::applicationDirPath()+fileName);
|
||||
if (!file.open(QFile::ReadOnly))
|
||||
{
|
||||
ERROR_LOG() << "Error opening file " << fileName;
|
||||
ERROR_LOG(m_logger) << "Error opening file " << fileName;
|
||||
failExit();
|
||||
}
|
||||
rawImage = file.readAll();
|
||||
DEBUG_LOG() << "Read file " << fileName;
|
||||
DEBUG_LOG(m_logger) << "Read file " << fileName;
|
||||
file.close();
|
||||
|
||||
data.content(LtsUtils::convert<std::vector<uint8_t>>(rawImage));
|
||||
@@ -394,7 +394,7 @@ void FlmTests::tryCreateFileContent()
|
||||
m_fileContentId = 0;
|
||||
if (!m_ftc->fileContentModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
QTRY_VERIFY(m_fileContentId > 0);
|
||||
@@ -403,30 +403,30 @@ void FlmTests::tryCreateFileContent()
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryModifyFileContent()
|
||||
{
|
||||
INFO_LOG() << "trying to send file content modify request ";
|
||||
INFO_LOG(m_logger) << "trying to send file content modify request ";
|
||||
|
||||
DEBUG_LOG() << "m_fileContentId = " << m_fileContentId;
|
||||
DEBUG_LOG(m_logger) << "m_fileContentId = " << m_fileContentId;
|
||||
|
||||
m_dtc->waitForHistoricalDataFileContent();
|
||||
const FileManagement::FileContent &flc = m_dtc->fileContent(m_fileContentId);
|
||||
FileManagement::FileContentModifyRequest data;
|
||||
|
||||
DEBUG_LOG() << "flc.id() = " << flc.id();
|
||||
DEBUG_LOG(m_logger) << "flc.id() = " << flc.id();
|
||||
|
||||
if (flc.id() == 0)
|
||||
{
|
||||
ERROR_LOG() << "Cannot find File Content Id = " << m_fileContentId;
|
||||
ERROR_LOG(m_logger) << "Cannot find File Content Id = " << m_fileContentId;
|
||||
failExit();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!checkContentSize(m_fileContentId))
|
||||
{
|
||||
ERROR_LOG() << "Content size 0";
|
||||
ERROR_LOG(m_logger) << "Content size 0";
|
||||
failExit();
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "Content size = " << m_content.size();
|
||||
DEBUG_LOG(m_logger) << "Content size = " << m_content.size();
|
||||
|
||||
data.id(flc.id());
|
||||
data.name(flc.name());
|
||||
@@ -454,7 +454,7 @@ void FlmTests::tryModifyFileContent()
|
||||
|
||||
if (!m_ftc->fileContentModifyRequest(FileContentModifyRequest(data), this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting modify data";
|
||||
ERROR_LOG(m_logger) << "Error requesting modify data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -471,7 +471,7 @@ bool FlmTests::checkContentSize(int fileId)
|
||||
m_content.clear();
|
||||
if (!m_ftc->getFileContentDataRequest(request, this))
|
||||
{
|
||||
ERROR_LOG() << "Cannot retrieve file content for id = " << fileId;
|
||||
ERROR_LOG(m_logger) << "Cannot retrieve file content for id = " << fileId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -483,25 +483,25 @@ bool FlmTests::checkContentSize(int fileId)
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryUpdateStatus()
|
||||
{
|
||||
INFO_LOG() << "trying update status file content";
|
||||
INFO_LOG(m_logger) << "trying update status file content";
|
||||
|
||||
DEBUG_LOG() << "m_fileContentId = " << m_fileContentId;
|
||||
DEBUG_LOG(m_logger) << "m_fileContentId = " << m_fileContentId;
|
||||
|
||||
m_dtc->waitForHistoricalDataFileContent();
|
||||
const FileManagement::FileContent &flc = m_dtc->fileContent(m_fileContentId);
|
||||
|
||||
DEBUG_LOG() << "flc.id() = " << flc.id();
|
||||
DEBUG_LOG(m_logger) << "flc.id() = " << flc.id();
|
||||
|
||||
if (flc.id() == 0)
|
||||
{
|
||||
ERROR_LOG() << "Cannot find File Content Id = " << m_fileContentId;
|
||||
ERROR_LOG(m_logger) << "Cannot find File Content Id = " << m_fileContentId;
|
||||
failExit();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!m_db->updateStatus(m_fileContentId, FileManagement::FileStatus::Deleted, m_operatorId))
|
||||
{
|
||||
ERROR_LOG() << "Cannot update status for File Content Id = " << m_fileContentId;
|
||||
ERROR_LOG(m_logger) << "Cannot update status for File Content Id = " << m_fileContentId;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -509,7 +509,7 @@ void FlmTests::tryUpdateStatus()
|
||||
|
||||
if (!checkContentSize(m_fileContentId))
|
||||
{
|
||||
ERROR_LOG() << "Content size 0";
|
||||
ERROR_LOG(m_logger) << "Content size 0";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -520,11 +520,11 @@ void FlmTests::tryUpdateStatus()
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryRemoveFileContent()
|
||||
{
|
||||
INFO_LOG() << "trying to send FileContentRemoveRequest ";
|
||||
INFO_LOG(m_logger) << "trying to send FileContentRemoveRequest ";
|
||||
m_dtc->waitForHistoricalDataFileContent();
|
||||
if (!m_ftc->fileContentRemoveRequest(FileContentRemoveRequest(m_fileContentId), this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting delete data";
|
||||
ERROR_LOG(m_logger) << "Error requesting delete data";
|
||||
failExit();
|
||||
}
|
||||
QTest::qWait(1000);
|
||||
@@ -533,11 +533,11 @@ void FlmTests::tryRemoveFileContent()
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryExportFileContent()
|
||||
{
|
||||
INFO_LOG() << "trying to send FileContentExportRequest ";
|
||||
INFO_LOG(m_logger) << "trying to send FileContentExportRequest ";
|
||||
m_dtc->waitForHistoricalDataFileContent();
|
||||
if (!m_ftc->fileContentExportRequest(FileContentExportRequest(m_fileContentId), this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting export data";
|
||||
ERROR_LOG(m_logger) << "Error requesting export data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -545,7 +545,7 @@ void FlmTests::tryExportFileContent()
|
||||
|
||||
if (!checkContentSize(m_fileContentId))
|
||||
{
|
||||
ERROR_LOG() << "Content size 0";
|
||||
ERROR_LOG(m_logger) << "Content size 0";
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -555,7 +555,7 @@ void FlmTests::tryExportFileContent()
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryCreatePlan()
|
||||
{
|
||||
INFO_LOG() << "trying to send file content create request ";
|
||||
INFO_LOG(m_logger) << "trying to send file content create request ";
|
||||
|
||||
FileContentModifyRequest data;
|
||||
|
||||
@@ -575,7 +575,7 @@ void FlmTests::tryCreatePlan()
|
||||
m_fileContentId = 0;
|
||||
if (!m_ftc->fileContentModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
QTRY_VERIFY(m_fileContentId > 0);
|
||||
@@ -584,7 +584,7 @@ void FlmTests::tryCreatePlan()
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryCreateFav()
|
||||
{
|
||||
INFO_LOG() << "trying to send file content create request ";
|
||||
INFO_LOG(m_logger) << "trying to send file content create request ";
|
||||
|
||||
FileContentModifyRequest data;
|
||||
|
||||
@@ -604,7 +604,7 @@ void FlmTests::tryCreateFav()
|
||||
m_fileContentId = 0;
|
||||
if (!m_ftc->fileContentModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
QTRY_VERIFY(m_fileContentId > 0);
|
||||
@@ -613,7 +613,7 @@ void FlmTests::tryCreateFav()
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryCreateSymbol()
|
||||
{
|
||||
INFO_LOG() << "trying to send file content create request ";
|
||||
INFO_LOG(m_logger) << "trying to send file content create request ";
|
||||
|
||||
FileContentModifyRequest data;
|
||||
|
||||
@@ -633,7 +633,7 @@ void FlmTests::tryCreateSymbol()
|
||||
m_fileContentId = 0;
|
||||
if (!m_ftc->fileContentModifyRequest(data, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting create data";
|
||||
ERROR_LOG(m_logger) << "Error requesting create data";
|
||||
failExit();
|
||||
}
|
||||
QTRY_VERIFY(m_fileContentId > 0);
|
||||
@@ -645,15 +645,15 @@ void FlmTests::tryGetContent()
|
||||
GetFileContentDataRequest request;
|
||||
|
||||
request.fileContentId(m_fileContentId);
|
||||
INFO_LOG() << "trying to send content request for file Id = " << m_fileContentId;
|
||||
INFO_LOG(m_logger) << "trying to send content request for file Id = " << m_fileContentId;
|
||||
|
||||
if (!m_ftc->getFileContentDataRequest(request, this))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting content for id : " << m_fileContentId;
|
||||
ERROR_LOG(m_logger) << "Error requesting content for id : " << m_fileContentId;
|
||||
failExit();
|
||||
}
|
||||
QTRY_VERIFY(m_content.size() > 0);
|
||||
DEBUG_LOG() << "Got content size: " << m_content.size();
|
||||
DEBUG_LOG(m_logger) << "Got content size: " << m_content.size();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
@@ -661,16 +661,16 @@ void FlmTests::onGetFileContentDataReply(const GetFileContentDataReply &replyObj
|
||||
{
|
||||
if (replyObject.errorString().size() > 0)
|
||||
{
|
||||
ERROR_LOG() << "Got onGetFileContentDataReply error: " << replyObject.errorString();
|
||||
ERROR_LOG(m_logger) << "Got onGetFileContentDataReply error: " << replyObject.errorString();
|
||||
failExit();
|
||||
}
|
||||
|
||||
INFO_LOG() << "Got reply with id " << replyObject.id()
|
||||
INFO_LOG(m_logger) << "Got reply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.errorString();
|
||||
|
||||
m_content = replyObject.content();
|
||||
|
||||
DEBUG_LOG() << "Content size: " << m_content.size();
|
||||
DEBUG_LOG(m_logger) << "Content size: " << m_content.size();
|
||||
|
||||
// QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
@@ -679,19 +679,19 @@ void FlmTests::onGetFileContentDataReply(const GetFileContentDataReply &replyObj
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryGetAllTemplates()
|
||||
{
|
||||
INFO_LOG() << "tryGetAllTemplates";
|
||||
INFO_LOG(m_logger) << "tryGetAllTemplates";
|
||||
|
||||
QList<FileContent> allTemplates;
|
||||
m_dtc->waitForHistoricalDataFileContent();
|
||||
if (!m_dtc->getAllTemplates(allTemplates))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting dtc data";
|
||||
ERROR_LOG(m_logger) << "Error requesting dtc data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "Found " << allTemplates.size() << " templates";
|
||||
DEBUG_LOG(m_logger) << "Found " << allTemplates.size() << " templates";
|
||||
for (const FileContent &fc : std::as_const(allTemplates))
|
||||
DEBUG_LOG() << "Found template (id, name) = (" << fc.id() << ", " << fc.name() << ")";
|
||||
DEBUG_LOG(m_logger) << "Found template (id, name) = (" << fc.id() << ", " << fc.name() << ")";
|
||||
|
||||
QTest::qWait(1000);
|
||||
}
|
||||
@@ -699,19 +699,19 @@ void FlmTests::tryGetAllTemplates()
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryGetAllPlans()
|
||||
{
|
||||
INFO_LOG() << "tryGetAllPlans";
|
||||
INFO_LOG(m_logger) << "tryGetAllPlans";
|
||||
|
||||
QStringList allPlans;
|
||||
m_dtc->waitForHistoricalDataFileContent();
|
||||
if (!m_dtc->getAllFiles(FileManagement::FileType::TacticalPlan, m_folderId, allPlans))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting dtc data";
|
||||
ERROR_LOG(m_logger) << "Error requesting dtc data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "Found " << allPlans.size() << " plans";
|
||||
DEBUG_LOG(m_logger) << "Found " << allPlans.size() << " plans";
|
||||
for (const QString &plan : std::as_const(allPlans))
|
||||
DEBUG_LOG() << "Found plan = " << plan;
|
||||
DEBUG_LOG(m_logger) << "Found plan = " << plan;
|
||||
|
||||
QTest::qWait(1000);
|
||||
}
|
||||
@@ -719,19 +719,19 @@ void FlmTests::tryGetAllPlans()
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryGetAllFavs()
|
||||
{
|
||||
INFO_LOG() << "tryGetAllFavs";
|
||||
INFO_LOG(m_logger) << "tryGetAllFavs";
|
||||
|
||||
QStringList allFavs;
|
||||
m_dtc->waitForHistoricalDataFileContent();
|
||||
if (!m_dtc->getAllFiles(FileManagement::FileType::OperatorFavourite, m_folderId, allFavs))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting dtc data";
|
||||
ERROR_LOG(m_logger) << "Error requesting dtc data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "Found " << allFavs.size() << " favs";
|
||||
DEBUG_LOG(m_logger) << "Found " << allFavs.size() << " favs";
|
||||
for (const QString &fav : std::as_const(allFavs))
|
||||
DEBUG_LOG() << "Found fav = " << fav;
|
||||
DEBUG_LOG(m_logger) << "Found fav = " << fav;
|
||||
|
||||
QTest::qWait(1000);
|
||||
}
|
||||
@@ -739,19 +739,19 @@ void FlmTests::tryGetAllFavs()
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::tryGetAllSymbols()
|
||||
{
|
||||
INFO_LOG() << "tryGetAllSymbols";
|
||||
INFO_LOG(m_logger) << "tryGetAllSymbols";
|
||||
|
||||
QStringList allSymbols;
|
||||
m_dtc->waitForHistoricalDataFileContent();
|
||||
if (!m_dtc->getAllFiles(FileManagement::FileType::OperatorDefinedSymbol, m_folderId, allSymbols))
|
||||
{
|
||||
ERROR_LOG() << "Error requesting dtc data";
|
||||
ERROR_LOG(m_logger) << "Error requesting dtc data";
|
||||
failExit();
|
||||
}
|
||||
|
||||
DEBUG_LOG() << "Found " << allSymbols.size() << " symbols";
|
||||
DEBUG_LOG(m_logger) << "Found " << allSymbols.size() << " symbols";
|
||||
for (const QString &symbol : std::as_const(allSymbols))
|
||||
DEBUG_LOG() << "Found symbol = " << symbol;
|
||||
DEBUG_LOG(m_logger) << "Found symbol = " << symbol;
|
||||
|
||||
QTest::qWait(1000);
|
||||
}
|
||||
@@ -760,7 +760,7 @@ void FlmTests::tryGetAllSymbols()
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::onError(const QString &reason)
|
||||
{
|
||||
ERROR_LOG() << "Got Reply error: " << reason;
|
||||
ERROR_LOG(m_logger) << "Got Reply error: " << reason;
|
||||
failExit();
|
||||
}
|
||||
|
||||
@@ -772,7 +772,7 @@ void FlmTests::onReply(const Core::FunctionReplyObject &replyObject)
|
||||
onError(replyObject.translated());
|
||||
return;
|
||||
}
|
||||
INFO_LOG() << "Got Reply with id " << replyObject.id()
|
||||
INFO_LOG(m_logger) << "Got Reply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
// QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
@@ -780,7 +780,7 @@ void FlmTests::onReply(const Core::FunctionReplyObject &replyObject)
|
||||
// ------------------------------------------------------------------------------
|
||||
void FlmTests::failExit()
|
||||
{
|
||||
ERROR_LOG() << "FAIL EXIT !";
|
||||
ERROR_LOG(m_logger) << "FAIL EXIT !";
|
||||
m_bTestsSuccessful = false;
|
||||
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
@@ -790,11 +790,11 @@ void FlmTests::onFolderModifyReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
if (replyObject.error())
|
||||
{
|
||||
ERROR_LOG() << "Got onFolderModifyReply error: " << replyObject();
|
||||
ERROR_LOG(m_logger) << "Got onFolderModifyReply error: " << replyObject();
|
||||
failExit();
|
||||
return;
|
||||
}
|
||||
INFO_LOG() << "Got modifyFolderReply with id " << replyObject.id()
|
||||
INFO_LOG(m_logger) << "Got modifyFolderReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
m_folderId = replyObject.id();
|
||||
}
|
||||
@@ -804,11 +804,11 @@ void FlmTests::onFileContentModifyReply(const Core::FunctionReplyObject &replyOb
|
||||
{
|
||||
if (replyObject.error())
|
||||
{
|
||||
ERROR_LOG() << "Got onFileContentModifyReply error: " << replyObject();
|
||||
ERROR_LOG(m_logger) << "Got onFileContentModifyReply error: " << replyObject();
|
||||
failExit();
|
||||
return;
|
||||
}
|
||||
INFO_LOG() << "Got modifyFileReply with id " << replyObject.id()
|
||||
INFO_LOG(m_logger) << "Got modifyFileReply with id " << replyObject.id()
|
||||
<< " and errorString " << replyObject.translated();
|
||||
m_fileContentId = replyObject.id();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user