Commit 0ac97dc9 authored by jehan's avatar jehan

give a little bit more time to download large file in tester

parent 5aad301d
......@@ -1266,7 +1266,7 @@ static void test_list_subscribe_wrong_body(void) {
LinphoneAddress *sub_addr = linphone_address_new("sip:rls@sip.example.com");
lev=linphone_core_create_subscribe(marie->lc,sub_addr,"presence",60);
linphone_event_ref(lev);
linphone_event_ref(lev); //to make sure we are still able to call linphone_event_terminate later
linphone_event_add_custom_header(lev,"Supported","eventlist");
linphone_event_add_custom_header(lev,"Accept","application/pidf+xml, application/rlmi+xml");
linphone_event_add_custom_header(lev,"Content-Disposition", "recipient-list");
......
......@@ -228,6 +228,8 @@ static void _send_file(LinphoneChatRoom* cr, const char *sendFilepath) {
_send_file_plus_text(cr, sendFilepath, NULL);
}
#define MAX_DOWNLOAD_TIME 30000 //can take up to 30s under low bandwidth network
static void _receive_file(bctbx_list_t *coresList, LinphoneCoreManager *lcm, stats *receiverStats, const char *receive_filepath, const char *sendFilepath) {
if (BC_ASSERT_TRUE(wait_for_list(coresList, &lcm->stat.number_of_LinphoneMessageReceivedWithFile, receiverStats->number_of_LinphoneMessageReceivedWithFile + 1, 10000))) {
LinphoneChatMessageCbs *cbs;
......@@ -243,7 +245,7 @@ static void _receive_file(bctbx_list_t *coresList, LinphoneCoreManager *lcm, sta
linphone_content_set_file_path(fileTransferContent, receive_filepath);
linphone_chat_message_download_content(msg, fileTransferContent);
if (BC_ASSERT_TRUE(wait_for_list(coresList, &lcm->stat.number_of_LinphoneFileTransferDownloadSuccessful,receiverStats->number_of_LinphoneFileTransferDownloadSuccessful + 1, 20000))) {
if (BC_ASSERT_TRUE(wait_for_list(coresList, &lcm->stat.number_of_LinphoneFileTransferDownloadSuccessful,receiverStats->number_of_LinphoneFileTransferDownloadSuccessful + 1, MAX_DOWNLOAD_TIME))) {
compare_files(sendFilepath, receive_filepath);
}
}
......@@ -267,7 +269,7 @@ static void _receive_file_plus_text(bctbx_list_t *coresList, LinphoneCoreManager
linphone_content_set_file_path(fileTransferContent, receive_filepath);
linphone_chat_message_download_content(msg, fileTransferContent);
if (BC_ASSERT_TRUE(wait_for_list(coresList, &lcm->stat.number_of_LinphoneFileTransferDownloadSuccessful,receiverStats->number_of_LinphoneFileTransferDownloadSuccessful + 1, 20000))) {
if (BC_ASSERT_TRUE(wait_for_list(coresList, &lcm->stat.number_of_LinphoneFileTransferDownloadSuccessful,receiverStats->number_of_LinphoneFileTransferDownloadSuccessful + 1, MAX_DOWNLOAD_TIME))) {
compare_files(sendFilepath, receive_filepath);
}
}
......
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