Commit 327f0c38d81a9f6d98c743a96c86e4528fbddc67

Authored by Wiebe Cazemier
1 parent 8094510f

Fix tests

FlashMQTests/FlashMQTests.pro
@@ -13,7 +13,6 @@ CONFIG -= app_bundle @@ -13,7 +13,6 @@ CONFIG -= app_bundle
13 TEMPLATE = app 13 TEMPLATE = app
14 14
15 SOURCES += tst_maintests.cpp \ 15 SOURCES += tst_maintests.cpp \
16 - ../MqttPacket.cpp \  
17 ../cirbuf.cpp \ 16 ../cirbuf.cpp \
18 ../client.cpp \ 17 ../client.cpp \
19 ../exceptions.cpp \ 18 ../exceptions.cpp \
@@ -27,6 +26,8 @@ SOURCES += tst_maintests.cpp \ @@ -27,6 +26,8 @@ SOURCES += tst_maintests.cpp \
27 ../utils.cpp \ 26 ../utils.cpp \
28 ../logger.cpp \ 27 ../logger.cpp \
29 ../authplugin.cpp \ 28 ../authplugin.cpp \
  29 + ../session.cpp \
  30 + ../configfileparser.cpp \
30 mainappthread.cpp \ 31 mainappthread.cpp \
31 twoclienttestcontext.cpp 32 twoclienttestcontext.cpp
32 33
@@ -46,6 +47,8 @@ HEADERS += \ @@ -46,6 +47,8 @@ HEADERS += \
46 ../utils.h \ 47 ../utils.h \
47 ../logger.h \ 48 ../logger.h \
48 ../authplugin.h \ 49 ../authplugin.h \
  50 + ../session.h \
  51 + ../configfileparser.h \
49 mainappthread.h \ 52 mainappthread.h \
50 twoclienttestcontext.h 53 twoclienttestcontext.h
51 54
FlashMQTests/mainappthread.cpp
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 2
3 MainAppThread::MainAppThread(QObject *parent) : QThread(parent) 3 MainAppThread::MainAppThread(QObject *parent) : QThread(parent)
4 { 4 {
  5 + MainApp::initMainApp(1, nullptr);
5 appInstance = MainApp::getMainApp(); 6 appInstance = MainApp::getMainApp();
6 } 7 }
7 8
@@ -13,6 +14,7 @@ void MainAppThread::run() @@ -13,6 +14,7 @@ void MainAppThread::run()
13 void MainAppThread::stopApp() 14 void MainAppThread::stopApp()
14 { 15 {
15 appInstance->quit(); 16 appInstance->quit();
  17 + wait();
16 } 18 }
17 19
18 void MainAppThread::waitForStarted() 20 void MainAppThread::waitForStarted()