FIX: fixed empty bug
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
Dominik Meyer 2024-01-16 12:41:45 +01:00
parent 0198266526
commit 91ef7ad770
Signed by: byterazor
GPG Key ID: EABDA0FD5981BC97
2 changed files with 10 additions and 5 deletions

View File

@ -295,6 +295,11 @@
{
bool isEmpty=true;
while(!commandQueue_.empty())
{
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
for (auto it = eventMap_.begin(); it != eventMap_.end(); ++it)
{
if ( !(*it).second.empty())

View File

@ -87,6 +87,11 @@ SCENARIO("Basic Usage of EventManager", "[Manager]")
manager = std::make_shared<EventManager::Manager>();
}());
REQUIRE_NOTHROW([&]()
{
manager->start();
}());
REQUIRE(manager->empty() == true);
std::shared_ptr<myParticipant> participant0;
@ -107,11 +112,6 @@ SCENARIO("Basic Usage of EventManager", "[Manager]")
REQUIRE(manager->empty() == false);
REQUIRE_NOTHROW([&]()
{
manager->start();
}());
REQUIRE(manager->isRunning() == true);
WHEN("emitting shutdown event")