Commit 00dd7943754b690221a6414694ee68df836858d9

Authored by Wiebe Cazemier
1 parent 15945e62

Fix tests

FlashMQTests/FlashMQTests.pro
... ... @@ -41,6 +41,7 @@ SOURCES += tst_maintests.cpp \
41 41 ../evpencodectxmanager.cpp \
42 42 ../acltree.cpp \
43 43 ../threadlocalutils.cpp \
  44 + ../flashmq_plugin.cpp \
44 45 mainappthread.cpp \
45 46 twoclienttestcontext.cpp
46 47  
... ... @@ -75,6 +76,7 @@ HEADERS += \
75 76 ../evpencodectxmanager.h \
76 77 ../acltree.h \
77 78 ../threadlocalutils.h \
  79 + ../flashmq_plugin.h \
78 80 mainappthread.h \
79 81 twoclienttestcontext.h
80 82  
... ...
FlashMQTests/mainappthread.cpp
... ... @@ -21,6 +21,7 @@ MainAppThread::MainAppThread(QObject *parent) : QThread(parent)
21 21 {
22 22 MainApp::initMainApp(1, nullptr);
23 23 appInstance = MainApp::getMainApp();
  24 + appInstance->settings->allowAnonymous = true;
24 25 }
25 26  
26 27 void MainAppThread::run()
... ...
mainapp.h
... ... @@ -46,6 +46,10 @@ License along with FlashMQ. If not, see <https://www.gnu.org/licenses/>.
46 46  
47 47 class MainApp
48 48 {
  49 +#ifdef TESTING
  50 + friend class MainAppThread;
  51 +#endif
  52 +
49 53 static MainApp *instance;
50 54 int num_threads = 0;
51 55  
... ...