From 327f0c38d81a9f6d98c743a96c86e4528fbddc67 Mon Sep 17 00:00:00 2001 From: Wiebe Cazemier Date: Mon, 18 Jan 2021 20:40:27 +0100 Subject: [PATCH] Fix tests --- FlashMQTests/FlashMQTests.pro | 5 ++++- FlashMQTests/mainappthread.cpp | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/FlashMQTests/FlashMQTests.pro b/FlashMQTests/FlashMQTests.pro index 0a4e429..96ca9fb 100644 --- a/FlashMQTests/FlashMQTests.pro +++ b/FlashMQTests/FlashMQTests.pro @@ -13,7 +13,6 @@ CONFIG -= app_bundle TEMPLATE = app SOURCES += tst_maintests.cpp \ - ../MqttPacket.cpp \ ../cirbuf.cpp \ ../client.cpp \ ../exceptions.cpp \ @@ -27,6 +26,8 @@ SOURCES += tst_maintests.cpp \ ../utils.cpp \ ../logger.cpp \ ../authplugin.cpp \ + ../session.cpp \ + ../configfileparser.cpp \ mainappthread.cpp \ twoclienttestcontext.cpp @@ -46,6 +47,8 @@ HEADERS += \ ../utils.h \ ../logger.h \ ../authplugin.h \ + ../session.h \ + ../configfileparser.h \ mainappthread.h \ twoclienttestcontext.h diff --git a/FlashMQTests/mainappthread.cpp b/FlashMQTests/mainappthread.cpp index 8b6ea5f..cb1c16f 100644 --- a/FlashMQTests/mainappthread.cpp +++ b/FlashMQTests/mainappthread.cpp @@ -2,6 +2,7 @@ MainAppThread::MainAppThread(QObject *parent) : QThread(parent) { + MainApp::initMainApp(1, nullptr); appInstance = MainApp::getMainApp(); } @@ -13,6 +14,7 @@ void MainAppThread::run() void MainAppThread::stopApp() { appInstance->quit(); + wait(); } void MainAppThread::waitForStarted() -- libgit2 0.21.4