mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
improve liblinphone test reliability
This commit is contained in:
parent
12629a26b6
commit
b03d48ded9
3 changed files with 33 additions and 0 deletions
|
|
@ -311,6 +311,14 @@ bool_t call_with_params2(LinphoneCoreManager* caller_mgr
|
|||
|
||||
}
|
||||
}
|
||||
/*wait ice re-invite*/
|
||||
if (linphone_core_get_firewall_policy(caller_mgr->lc) == LinphonePolicyUseIce
|
||||
&& linphone_core_get_firewall_policy(callee_mgr->lc) == LinphonePolicyUseIce
|
||||
&& !linphone_core_sdp_200_ack_enabled(caller_mgr->lc)) { /*ice does not work with sdp less invite*/
|
||||
BC_ASSERT_TRUE(wait_for(callee_mgr->lc,caller_mgr->lc,&caller_mgr->stat.number_of_LinphoneCallStreamsRunning,initial_caller.number_of_LinphoneCallStreamsRunning+2));
|
||||
BC_ASSERT_TRUE(wait_for(callee_mgr->lc,caller_mgr->lc,&callee_mgr->stat.number_of_LinphoneCallStreamsRunning,initial_callee.number_of_LinphoneCallStreamsRunning+2));
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1255,6 +1255,11 @@ static void text_message_with_send_error(void) {
|
|||
BC_ASSERT_EQUAL(ms_list_size(chat_room->transient_messages), 0, int, "%d");
|
||||
|
||||
sal_set_send_error(marie->lc->sal, 0);
|
||||
|
||||
/*give a chance to register again to allow linphone_core_manager_destroy to properly unregister*/
|
||||
linphone_core_refresh_registers(marie->lc);
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneRegistrationOk,marie->stat.number_of_LinphoneRegistrationOk + 1));
|
||||
|
||||
ms_free(to);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
|
|
|
|||
|
|
@ -269,6 +269,26 @@ static void simple_encrypted_conference_with_ice(LinphoneMediaEncryption mode) {
|
|||
linphone_core_set_firewall_policy(laure->lc,LinphonePolicyUseIce);
|
||||
linphone_core_set_stun_server(laure->lc,"stun.linphone.org");
|
||||
|
||||
/*work around a to avoid stun resolution to be initiate in call_received callback leading a mainloop reentrency*/
|
||||
/*
|
||||
belle_sip_main_loop_iterate() at belle_sip_loop.c:369
|
||||
belle_sip_main_loop_run [inlined]() at belle_sip_loop.c:478
|
||||
belle_sip_main_loop_sleep() at belle_sip_loop.c:490
|
||||
sal_iterate() at sal_impl.c:745
|
||||
linphone_core_get_stun_server_addrinfo() at misc.c:585
|
||||
linphone_core_gather_ice_candidates() at misc.c:610
|
||||
linphone_call_prepare_ice() at linphonecall.c:1 906
|
||||
linphone_call_new_incoming() at linphonecall.c:1 101
|
||||
call_received() at callbacks.c:347
|
||||
...
|
||||
linphone_core_iterate() at linphonecore.c:2 620
|
||||
...
|
||||
*/
|
||||
linphone_core_get_stun_server_addrinfo(marie->lc);
|
||||
linphone_core_get_stun_server_addrinfo(pauline->lc);
|
||||
linphone_core_get_stun_server_addrinfo(laure->lc);
|
||||
/**/
|
||||
|
||||
linphone_core_set_media_encryption(marie->lc,mode);
|
||||
linphone_core_set_media_encryption(pauline->lc,mode);
|
||||
linphone_core_set_media_encryption(laure->lc,mode);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue