From d69105090fe6f97aabb9c54512ed7037451eea09 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 23 Dec 2015 14:47:35 +0100 Subject: [PATCH] fix flexisip tests --- tester/flexisip_tester.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tester/flexisip_tester.c b/tester/flexisip_tester.c index 78ab7727b..2dd9da4ef 100644 --- a/tester/flexisip_tester.c +++ b/tester/flexisip_tester.c @@ -97,6 +97,13 @@ static void message_forking_with_unreachable_recipients(void) { lcs=ms_list_append(lcs,pauline->lc); lcs=ms_list_append(lcs,marie2->lc); lcs=ms_list_append(lcs,marie3->lc); + + /*the following lines are to workaround a problem with messages sent by a previous test (Message forking) that arrive together with REGISTER responses, + * because the ForkMessageContext is not terminated at flexisip side if Message forking test is passing fast*/ + wait_for_list(lcs,NULL,0,1000); + marie->stat.number_of_LinphoneMessageReceived = 0; + marie2->stat.number_of_LinphoneMessageReceived = 0; + marie3->stat.number_of_LinphoneMessageReceived = 0; /*marie2 and marie3 go offline*/ linphone_core_set_network_reachable(marie2->lc,FALSE); @@ -139,6 +146,14 @@ static void message_forking_with_all_recipients_unreachable(void) { lcs=ms_list_append(lcs,marie2->lc); lcs=ms_list_append(lcs,marie3->lc); + /*the following lines are to workaround a problem with messages sent by a previous test (Message forking) that arrive together with REGISTER responses, + * because the ForkMessageContext is not terminated at flexisip side if Message forking test is passing fast*/ + wait_for_list(lcs,NULL,0,1000); + marie->stat.number_of_LinphoneMessageReceived = 0; + marie2->stat.number_of_LinphoneMessageReceived = 0; + marie3->stat.number_of_LinphoneMessageReceived = 0; + + /*All marie's device go offline*/ linphone_core_set_network_reachable(marie->lc,FALSE); linphone_core_set_network_reachable(marie2->lc,FALSE);