diff --git a/FlashMQTests/maintests.cpp b/FlashMQTests/maintests.cpp index 5cf740ca..e6c1b3ad 100644 --- a/FlashMQTests/maintests.cpp +++ b/FlashMQTests/maintests.cpp @@ -116,10 +116,10 @@ void MainTests::initBeforeEachTest(const std::vector &args) // We test functions directly that the server normally only calls from worker threads, in which thread data is available. This is kind of a dummy-fix, until // we actually need correct thread data at those points (at this point, it's only to increase message counters). - Settings settings; PluginLoader pluginLoader; this->dummyThreadData = std::make_shared(666, settings, pluginLoader); ThreadGlobals::assignThreadData(dummyThreadData.get()); + ThreadGlobals::assignSettings(&this->settings); } void MainTests::initBeforeEachTest() diff --git a/FlashMQTests/maintests.h b/FlashMQTests/maintests.h index 2a977b15..64947e1d 100644 --- a/FlashMQTests/maintests.h +++ b/FlashMQTests/maintests.h @@ -15,6 +15,7 @@ class MainTests std::unique_ptr mainApp; std::shared_ptr dummyThreadData; + Settings settings; std::map> testFunctions;