mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
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:
@ -2230,6 +2230,10 @@ ConversationTest::testFixContactDetails()
|
|||||||
|
|
||||||
aliceAccount->convModule()->loadConversations();
|
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);
|
details = aliceAccount->getContactDetails(bobUri);
|
||||||
CPPUNIT_ASSERT(details["conversationId"] == aliceData.conversationId);
|
CPPUNIT_ASSERT(details["conversationId"] == aliceData.conversationId);
|
||||||
}
|
}
|
||||||
@ -2410,6 +2414,9 @@ ConversationTest::testLoadPartiallyRemovedConversation()
|
|||||||
// Reloading conversation should remove directory
|
// Reloading conversation should remove directory
|
||||||
CPPUNIT_ASSERT(std::filesystem::is_directory(repoPathAlice));
|
CPPUNIT_ASSERT(std::filesystem::is_directory(repoPathAlice));
|
||||||
aliceAccount->convModule()->loadConversations();
|
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));
|
CPPUNIT_ASSERT(!std::filesystem::is_directory(repoPathAlice));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user