mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-07 22:02:12 +08:00
unitTest: reduce ut_swarm_conversation runtime
The local cv variable in testSendMessage was shadowing the corresponding member variable in SwarmConversationTest. As a result, the calls to cv.notify_one() in the signal handlers had no effect and the calls to cv.wait_for() in the test would block until they hit the timeout, which significantly increased the amount of time needed to complete the test. Change-Id: I75b6aac8801568831a17035ad86876a130efe12e
This commit is contained in:
@ -160,7 +160,6 @@ SwarmConversationTest::testSendMessage()
|
||||
|
||||
std::mutex mtx;
|
||||
std::unique_lock lk {mtx};
|
||||
std::condition_variable cv;
|
||||
|
||||
connectSignals();
|
||||
|
||||
@ -179,7 +178,7 @@ SwarmConversationTest::testSendMessage()
|
||||
}));
|
||||
|
||||
libjami::acceptConversationRequest(it->first, convId);
|
||||
std::this_thread::sleep_for(std::chrono::seconds(10));
|
||||
std::this_thread::sleep_for(std::chrono::seconds(5));
|
||||
}
|
||||
|
||||
std::cout << "waiting for conversation ready" << std::endl;
|
||||
|
Reference in New Issue
Block a user