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:
François-Simon Fauteux-Chapleau
2025-05-01 17:11:47 -04:00
parent 2cd49b2820
commit 130a6603d6

View File

@ -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;