From 570ed0f598e303b29a62ad0e02ad419217cabb95 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Thu, 4 Dec 2014 15:55:24 +0100 Subject: [PATCH] Invert check order in log collection because file checking consumes lot of time --- tester/log_collection_tester.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tester/log_collection_tester.c b/tester/log_collection_tester.c index b9c1835c5..4f18f1224 100644 --- a/tester/log_collection_tester.c +++ b/tester/log_collection_tester.c @@ -161,7 +161,7 @@ static void collect_files_filled() { LinphoneCoreManager* marie = setup(TRUE); char * filepath = linphone_core_compress_log_collection(marie->lc); CU_ASSERT_PTR_NOT_NULL(filepath); - CU_ASSERT_EQUAL(ms_time(0), check_file(filepath)); + CU_ASSERT_EQUAL(check_file(filepath), ms_time(0)); linphone_core_manager_destroy(marie); } @@ -171,7 +171,7 @@ static void collect_files_small_size() { linphone_core_set_log_collection_max_file_size(5000); filepath = linphone_core_compress_log_collection(marie->lc); CU_ASSERT_PTR_NOT_NULL(filepath); - CU_ASSERT_EQUAL(ms_time(0), check_file(filepath)); + CU_ASSERT_EQUAL(check_file(filepath), ms_time(0)); linphone_core_manager_destroy(marie); } @@ -182,7 +182,7 @@ static void collect_files_changing_size() { filepath = linphone_core_compress_log_collection(marie->lc); CU_ASSERT_PTR_NOT_NULL(filepath); - CU_ASSERT_EQUAL(ms_time(0), check_file(filepath)); + CU_ASSERT_EQUAL(check_file(filepath), ms_time(0)); linphone_core_set_log_collection_max_file_size(5000); // Generate some logs @@ -190,7 +190,7 @@ static void collect_files_changing_size() { filepath = linphone_core_compress_log_collection(marie->lc); CU_ASSERT_PTR_NOT_NULL(filepath); - CU_ASSERT_EQUAL(ms_time(0), check_file(filepath)); + CU_ASSERT_EQUAL(check_file(filepath), ms_time(0)); linphone_core_manager_destroy(marie); }