mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
test: fix sporadic failures in testCacheRequestFromClient
Change-Id: I5139977d9d1fe49c9773ab3ad4a069ecf67ef637
This commit is contained in:
@ -945,7 +945,16 @@ ConversationRequestTest::testCacheRequestFromClient()
|
||||
CPPUNIT_ASSERT(bobAccount->getTrustRequests().size() == 1);
|
||||
libjami::acceptConversationRequest(bobId, aliceData.conversationId);
|
||||
CPPUNIT_ASSERT(cv.wait_for(lk, 30s, [&]() { return !bobData.conversationId.empty(); }));
|
||||
CPPUNIT_ASSERT(!std::filesystem::is_regular_file(cachedPath));
|
||||
// cachedPath is removed on confirmation (from the DHT), so this can take a few secs to come
|
||||
auto removed = false;
|
||||
for (int i = 0; i <= 10; ++i) {
|
||||
if (!std::filesystem::is_regular_file(cachedPath)) {
|
||||
removed = true;
|
||||
break;
|
||||
}
|
||||
std::this_thread::sleep_for(1s);
|
||||
}
|
||||
CPPUNIT_ASSERT(removed);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user