Merge PR #270: Stabilize logging tests
This commit is contained in:
commit
55081538de
@ -58,6 +58,7 @@ private:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void initTestCase();
|
void initTestCase();
|
||||||
|
void init();
|
||||||
|
|
||||||
void initLogs();
|
void initLogs();
|
||||||
|
|
||||||
@ -98,6 +99,11 @@ void TestLogging::initTestCase()
|
|||||||
"Application.debug=true\n");
|
"Application.debug=true\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TestLogging::init()
|
||||||
|
{
|
||||||
|
waitForDBSync();
|
||||||
|
}
|
||||||
|
|
||||||
void TestLogging::initLogs()
|
void TestLogging::initLogs()
|
||||||
{
|
{
|
||||||
QVariant response = injectAndWait("Logging.GetLogEntries");
|
QVariant response = injectAndWait("Logging.GetLogEntries");
|
||||||
@ -109,6 +115,7 @@ void TestLogging::initLogs()
|
|||||||
.toUtf8());
|
.toUtf8());
|
||||||
|
|
||||||
clearLoggingDatabase();
|
clearLoggingDatabase();
|
||||||
|
waitForDBSync();
|
||||||
|
|
||||||
response = injectAndWait("Logging.GetLogEntries");
|
response = injectAndWait("Logging.GetLogEntries");
|
||||||
verifyLoggingError(response);
|
verifyLoggingError(response);
|
||||||
@ -543,7 +550,7 @@ void TestLogging::testDoubleValues()
|
|||||||
PairingTransactionId pairingTransactionId(response.toMap().value("params").toMap().value("pairingTransactionId").toString());
|
PairingTransactionId pairingTransactionId(response.toMap().value("params").toMap().value("pairingTransactionId").toString());
|
||||||
QString displayMessage = response.toMap().value("params").toMap().value("displayMessage").toString();
|
QString displayMessage = response.toMap().value("params").toMap().value("displayMessage").toString();
|
||||||
|
|
||||||
qDebug() << "displayMessage" << displayMessage;
|
qCDebug(dcTests) << "displayMessage" << displayMessage;
|
||||||
|
|
||||||
params.clear();
|
params.clear();
|
||||||
params.insert("pairingTransactionId", pairingTransactionId.toString());
|
params.insert("pairingTransactionId", pairingTransactionId.toString());
|
||||||
@ -570,7 +577,7 @@ void TestLogging::testDoubleValues()
|
|||||||
response = injectAndWait("Actions.ExecuteAction", params);
|
response = injectAndWait("Actions.ExecuteAction", params);
|
||||||
verifyDeviceError(response);
|
verifyDeviceError(response);
|
||||||
|
|
||||||
notificationSpy.wait(1000);
|
notificationSpy.wait();
|
||||||
QVariantList logNotificationsList = checkNotifications(notificationSpy, "Logging.LogEntryAdded");
|
QVariantList logNotificationsList = checkNotifications(notificationSpy, "Logging.LogEntryAdded");
|
||||||
QVERIFY2(!logNotificationsList.isEmpty(), "Did not get Logging.LogEntryAdded notification.");
|
QVERIFY2(!logNotificationsList.isEmpty(), "Did not get Logging.LogEntryAdded notification.");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user