From b0f02153e9dc09a69fa0153ab07d9f3d105fedbd Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Sat, 23 Jan 2016 12:19:38 +0100 Subject: [PATCH] fix bug in test, that should wait ICE reINVITE to complete. --- mediastreamer2 | 2 +- tester/call_tester.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/mediastreamer2 b/mediastreamer2 index 687595aef..6f6ca8755 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 687595aef470a3ee2b83574c04c36b92a99110e8 +Subproject commit 6f6ca87556fd8fe62ee463457fc4c305d3e6267c diff --git a/tester/call_tester.c b/tester/call_tester.c index e78efa5ba..8a7404714 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -5493,7 +5493,12 @@ static void _call_with_network_switch(bool_t use_ice, bool_t with_socket_refresh if (!call_ok) goto end; wait_for_until(marie->lc, pauline->lc, NULL, 0, 2000); - if (use_ice) BC_ASSERT_TRUE(check_ice(pauline,marie,LinphoneIceStateHostConnection)); + if (use_ice) { + BC_ASSERT_TRUE(check_ice(pauline,marie,LinphoneIceStateHostConnection)); + /*wait for ICE reINVITE to complete*/ + BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &pauline->stat.number_of_LinphoneCallStreamsRunning, 2)); + BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneCallStreamsRunning, 2)); + } /*marie looses the network and reconnects*/ linphone_core_set_network_reachable(marie->lc, FALSE); @@ -5560,8 +5565,12 @@ static void call_with_sip_and_rtp_independant_switches(){ if (!call_ok) goto end; wait_for_until(marie->lc, pauline->lc, NULL, 0, 2000); - if (use_ice) BC_ASSERT_TRUE(check_ice(pauline,marie,LinphoneIceStateHostConnection)); - + if (use_ice) { + BC_ASSERT_TRUE(check_ice(pauline,marie,LinphoneIceStateHostConnection)); + /*wait for ICE reINVITE to complete*/ + BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &pauline->stat.number_of_LinphoneCallStreamsRunning, 2)); + BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneCallStreamsRunning, 2)); + } /*marie looses the SIP network and reconnects*/ linphone_core_set_sip_network_reachable(marie->lc, FALSE); wait_for_until(marie->lc, pauline->lc, NULL, 0, 1000);