From e52b45c8151a7736a13973227fd8d2ddd61b8f47 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Mon, 4 Jan 2021 18:02:26 +0100 Subject: [PATCH] fix tests --- libnymea-core/logging/logengine.cpp | 1 + tests/auto/logging/testlogging.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/libnymea-core/logging/logengine.cpp b/libnymea-core/logging/logengine.cpp index 4927e5a9..173f4be9 100644 --- a/libnymea-core/logging/logengine.cpp +++ b/libnymea-core/logging/logengine.cpp @@ -223,6 +223,7 @@ void LogEngine::clearDatabase() void LogEngine::logSystemEvent(const QDateTime &dateTime, bool active, Logging::LoggingLevel level) { + qCDebug(dcLogEngine()) << "Logging system event:" << active; LogEntry entry(dateTime, level, Logging::LoggingSourceSystem); entry.setEventType(Logging::LoggingEventTypeActiveChange); entry.setActive(active); diff --git a/tests/auto/logging/testlogging.cpp b/tests/auto/logging/testlogging.cpp index f0cc833e..9c9ac62a 100644 --- a/tests/auto/logging/testlogging.cpp +++ b/tests/auto/logging/testlogging.cpp @@ -199,6 +199,7 @@ void TestLogging::systemLogs() qWarning() << "Restarting server"; restartServer(); qWarning() << "Restart done"; + waitForDBSync(); // there should be 2 log entries, one for shutdown, one for startup (from server restart) response = injectAndWait("Logging.GetLogEntries", params);