diff --git a/test/unitTest/call/call.cpp b/test/unitTest/call/call.cpp index 28dc79d8cf0e991bde6b891391beea0dc0b5bf45..23db702083fa496413ce3ba9490ebcd59433aced 100644 --- a/test/unitTest/call/call.cpp +++ b/test/unitTest/call/call.cpp @@ -137,11 +137,10 @@ CallTest::tearDown() std::condition_variable cv; auto currentAccSize = Manager::instance().getAccountList().size(); std::atomic_bool accountsRemoved {false}; + auto wantedAccountNumber = currentAccSize - (bob2Id.empty() ? 2 : 3); confHandlers.insert( DRing::exportable_callback<DRing::ConfigurationSignal::AccountsChanged>([&]() { - if (Manager::instance().getAccountList().size() <= currentAccSize - bob2Id.empty() - ? 2 - : 3) { + if (Manager::instance().getAccountList().size() <= wantedAccountNumber) { accountsRemoved = true; cv.notify_one(); }