From d865f171595c2b435eb3822cf114eee30d53f610 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 25 May 2018 12:00:24 +0200 Subject: [PATCH] Fix test that was not un-registering Marie. It created many failures later on because of messages being kept by flexisip for this participant. --- tester/message_tester.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tester/message_tester.c b/tester/message_tester.c index 844c4c41b..f6ae8c3bf 100644 --- a/tester/message_tester.c +++ b/tester/message_tester.c @@ -1503,7 +1503,7 @@ static void lime_cache_migration(void) { if ((xmlCacheFD = fopen(xmlCache_filepath, "w") ) == NULL) { BC_ASSERT_PTR_NOT_NULL(xmlCacheFD); ms_error("Unable to create temporary XML ZID cache file to test cache migration"); - return; + goto end; } fprintf(xmlCacheFD, "%s", xmlCacheMigration); fclose(xmlCacheFD); @@ -1516,10 +1516,12 @@ static void lime_cache_migration(void) { linphone_proxy_config_set_identity_address(cfg, new_identity); linphone_proxy_config_done(cfg); + + BC_ASSERT_TRUE(wait_for_until(marie->lc, NULL, &marie->stat.number_of_LinphoneRegistrationOk, 2, 5000)); if (!linphone_core_lime_available(marie->lc)) { ms_warning("Lime not available, skiping"); - return; + goto end; } /* make sure lime is enabled */ @@ -1543,8 +1545,11 @@ static void lime_cache_migration(void) { /* TODO */ /* free memory */ + + end: linphone_core_manager_destroy(marie); remove(xmlCache_filepath); + bc_free(xmlCache_filepath); } }