Skip to content
Snippets Groups Projects
Commit 7fd1bac6 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

test: fix sporadic failures in testCacheRequestFromClient

Change-Id: I5139977d9d1fe49c9773ab3ad4a069ecf67ef637
parent 340e4d0d
No related branches found
No related tags found
No related merge requests found
...@@ -945,7 +945,16 @@ ConversationRequestTest::testCacheRequestFromClient() ...@@ -945,7 +945,16 @@ ConversationRequestTest::testCacheRequestFromClient()
CPPUNIT_ASSERT(bobAccount->getTrustRequests().size() == 1); CPPUNIT_ASSERT(bobAccount->getTrustRequests().size() == 1);
libjami::acceptConversationRequest(bobId, aliceData.conversationId); libjami::acceptConversationRequest(bobId, aliceData.conversationId);
CPPUNIT_ASSERT(cv.wait_for(lk, 30s, [&]() { return !bobData.conversationId.empty(); })); 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 void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment