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

misc: fix testJoinAfterMuteHost

Change-Id: I6372066ec95fdd80d7e754946757a8dfdcbd38d6
parent 1b8f63bb
No related branches found
No related tags found
No related merge requests found
...@@ -1040,7 +1040,16 @@ ConversationCallTest::testJoinAfterMuteHost() ...@@ -1040,7 +1040,16 @@ ConversationCallTest::testJoinAfterMuteHost()
aliceData_.messages.clear(); aliceData_.messages.clear();
bobData_.messages.clear(); bobData_.messages.clear();
carlaData_.messages.clear(); carlaData_.messages.clear();
auto callId = libjami::placeCallWithMedia(aliceId, "swarm:" + aliceData_.id, {}); std::vector<std::map<std::string, std::string>> mediaList;
std::map<std::string, std::string> mediaAttribute
= {{libjami::Media::MediaAttributeKey::MEDIA_TYPE,
libjami::Media::MediaAttributeValue::AUDIO},
{libjami::Media::MediaAttributeKey::ENABLED, TRUE_STR},
{libjami::Media::MediaAttributeKey::MUTED, FALSE_STR},
{libjami::Media::MediaAttributeKey::SOURCE, ""},
{libjami::Media::MediaAttributeKey::LABEL, "audio_0"}};
mediaList.emplace_back(mediaAttribute);
auto callId = libjami::placeCallWithMedia(aliceId, "swarm:" + aliceData_.id, mediaList);
auto lastCommitIsCall = [&](const auto& data) { auto lastCommitIsCall = [&](const auto& data) {
return !data.messages.empty() return !data.messages.empty()
&& data.messages.rbegin()->at("type") == "application/call-history+json"; && data.messages.rbegin()->at("type") == "application/call-history+json";
...@@ -1068,7 +1077,7 @@ ConversationCallTest::testJoinAfterMuteHost() ...@@ -1068,7 +1077,7 @@ ConversationCallTest::testJoinAfterMuteHost()
aliceData_.conferenceChanged = false; aliceData_.conferenceChanged = false;
pInfos_.clear(); pInfos_.clear();
auto bobCall = libjami::placeCallWithMedia(bobId, destination, {}); auto bobCall = libjami::placeCallWithMedia(bobId, destination, mediaList);
CPPUNIT_ASSERT(cv.wait_for(lk, 30s, [&]() { CPPUNIT_ASSERT(cv.wait_for(lk, 30s, [&]() {
return aliceData_.conferenceChanged && bobData_.hostState == "CURRENT" && bobData_.state == "CURRENT" && pInfos_.size() == 2; return aliceData_.conferenceChanged && bobData_.hostState == "CURRENT" && bobData_.state == "CURRENT" && pInfos_.size() == 2;
})); }));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment