Skip to content
Snippets Groups Projects
Commit c231523e authored by François-Simon Fauteux-Chapleau's avatar François-Simon Fauteux-Chapleau
Browse files

unitTest: fix broken conversation tests

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

GitLab: #1117
Change-Id: Idebd037b2bf9083f59a108455fea82f2203a3ece
parent fc340294
No related branches found
No related tags found
No related merge requests found
......@@ -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));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment