unitTest: fix broken conversation tests

Commit 86d3bb6 accidentally broke two conversation tests by removing
necessary waiting periods.

GitLab: #1117
Change-Id: Idebd037b2bf9083f59a108455fea82f2203a3ece
This commit is contained in:
François-Simon Fauteux-Chapleau
2025-03-24 16:51:05 -04:00
parent fc3402940f
commit c231523ef2

View File

@ -2230,6 +2230,10 @@ ConversationTest::testFixContactDetails()
aliceAccount->convModule()->loadConversations();
// loadConversations doesn't fix the contact details synchronously, so the
// test will fail if we don't wait for a little bit here.
std::this_thread::sleep_for(1s);
details = aliceAccount->getContactDetails(bobUri);
CPPUNIT_ASSERT(details["conversationId"] == aliceData.conversationId);
}
@ -2410,6 +2414,9 @@ ConversationTest::testLoadPartiallyRemovedConversation()
// Reloading conversation should remove directory
CPPUNIT_ASSERT(std::filesystem::is_directory(repoPathAlice));
aliceAccount->convModule()->loadConversations();
// loadConversations doesn't remove the directory synchronously, so the
// test will fail if we don't wait for a little bit here.
std::this_thread::sleep_for(1s);
CPPUNIT_ASSERT(!std::filesystem::is_directory(repoPathAlice));
}