Commit 44db4822 authored by Simon Morlat's avatar Simon Morlat

Add troubleshooting in video call test suite.

parent 24cd60cf
...@@ -924,20 +924,24 @@ static void _call_with_ice_video(LinphoneVideoPolicy caller_policy, LinphoneVide ...@@ -924,20 +924,24 @@ static void _call_with_ice_video(LinphoneVideoPolicy caller_policy, LinphoneVide
BC_ASSERT_TRUE(check_ice(pauline, marie, LinphoneIceStateHostConnection)); BC_ASSERT_TRUE(check_ice(pauline, marie, LinphoneIceStateHostConnection));
check_nb_media_starts(pauline, marie, nb_media_starts, nb_media_starts); check_nb_media_starts(pauline, marie, nb_media_starts, nb_media_starts);
nb_media_starts++; nb_media_starts++;
if (video_added_by_caller) { if (caller_policy.automatically_initiate && callee_policy.automatically_accept && (video_added_by_caller || video_added_by_callee)){
BC_ASSERT_TRUE(add_video(marie, pauline, FALSE)); BC_FAIL("Tired developer detected. You have requested the test to add video while it is already established from the beginning of the call.");
} else if (video_added_by_callee) { }else{
BC_ASSERT_TRUE(add_video(pauline, marie, FALSE)); if (video_added_by_caller) {
} BC_ASSERT_TRUE(add_video(marie, pauline, FALSE));
if (video_added_by_caller || video_added_by_callee) { } else if (video_added_by_callee) {
BC_ASSERT_TRUE(check_ice(pauline, marie, LinphoneIceStateHostConnection)); BC_ASSERT_TRUE(add_video(pauline, marie, FALSE));
if (linphone_call_params_video_enabled(linphone_call_get_current_params(linphone_core_get_current_call(marie->lc)))){ }
/* Wait for ICE reINVITEs to complete if video was really added */ if (video_added_by_caller || video_added_by_callee) {
BC_ASSERT_TRUE(wait_for(pauline->lc, marie->lc, &pauline->stat.number_of_LinphoneCallStreamsRunning, 4) BC_ASSERT_TRUE(check_ice(pauline, marie, LinphoneIceStateHostConnection));
&& wait_for(pauline->lc, pauline->lc, &marie->stat.number_of_LinphoneCallStreamsRunning, 4)); if (linphone_call_params_video_enabled(linphone_call_get_current_params(linphone_core_get_current_call(marie->lc)))){
check_nb_media_starts(pauline, marie, nb_media_starts, nb_media_starts); /* Wait for ICE reINVITEs to complete if video was really added */
nb_media_starts++; BC_ASSERT_TRUE(wait_for(pauline->lc, marie->lc, &pauline->stat.number_of_LinphoneCallStreamsRunning, 4)
&& wait_for(pauline->lc, pauline->lc, &marie->stat.number_of_LinphoneCallStreamsRunning, 4));
check_nb_media_starts(pauline, marie, nb_media_starts, nb_media_starts);
nb_media_starts++;
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment