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

test: fix sporadic failure in conversation_call

Change-Id: Ib7b61be24c94d79ef426a2c93021188b6dbae040
parent 39114bc5
Branches
No related tags found
Loading
......@@ -294,8 +294,8 @@ ConversationCallTest::testActiveCalls()
aliceData_.messages.clear();
auto callId = libjami::placeCallWithMedia(aliceId, "swarm:" + aliceData_.id, {});
// should get message
cv.wait_for(lk, 30s, [&]() { return !aliceData_.messages.empty(); });
CPPUNIT_ASSERT(aliceData_.messages[0].type == "application/call-history+json");
cv.wait_for(lk, 30s, [&]() { return !aliceData_.conferenceChanged && !aliceData_.messages.empty(); });
CPPUNIT_ASSERT(aliceData_.messages.rbegin()->type == "application/call-history+json");
// get active calls = 1
CPPUNIT_ASSERT(libjami::getActiveCalls(aliceId, aliceData_.id).size() == 1);
......@@ -306,7 +306,7 @@ ConversationCallTest::testActiveCalls()
// should get message
cv.wait_for(lk, 30s, [&]() { return !aliceData_.messages.empty(); });
CPPUNIT_ASSERT(aliceData_.messages[0].body.find("duration") != aliceData_.messages[0].body.end());
CPPUNIT_ASSERT(aliceData_.messages.rbegin()->body.find("duration") != aliceData_.messages.rbegin()->body.end());
// get active calls = 0
CPPUNIT_ASSERT(libjami::getActiveCalls(aliceId, aliceData_.id).size() == 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment