[ITC][notification][Non-ACR][Added fix for failing TC ITc_noti_ex_event_info_clone_de... 69/239269/2
authorMOHIT MIGLANI <mohit.m@samsung.com>
Thu, 23 Jul 2020 08:25:33 +0000 (13:55 +0530)
committershobhit verma <shobhit.v@samsung.com>
Thu, 23 Jul 2020 11:58:30 +0000 (11:58 +0000)
- Added delay of 5 secs after app_control_send_launch_request api is called.

Change-Id: I7578372b13055fbf5aabbc055fa1350351bd6763
Signed-off-by: MOHIT MIGLANI <mohit.m@samsung.com>
src/itc/notification/ITs-notification-ex-event_info.c

index cbda34463dca484c616ede49aac5214e07262cb9..feac78edf73cd1dd6c9055bccc0850edab965f8d 100755 (executable)
@@ -278,20 +278,33 @@ void ITs_notification_ex_event_info_startup(void)
         app_control_h request;
         int ret;
         bool running = false;
+        int nTimeoutId = 0;
         app_manager_is_running(TEST_APPID, &running);
         if(!running)
        {
                app_control_create(&request);
                if (!request)
+                {
+                        FPRINTF("[Line : %d][%s] app_control_create failed \\n", __LINE__, API_NAMESPACE);
                        return;
-
+                }
                ret = app_control_set_app_id(request, TEST_APPID);
                if (ret != APP_ERROR_NONE)
+                {
+                        FPRINTF("[Line : %d][%s] app_control_set_app_id failed \\n", __LINE__, API_NAMESPACE);
                        return;
-
+                }
                ret = app_control_send_launch_request(request, ReplyCB, NULL);
                if (ret != APP_ERROR_NONE)
+                {
+                        FPRINTF("[Line : %d][%s] app_control_send_launch_request failed \\n", __LINE__, API_NAMESPACE);
                        return;
+                }
+                g_pNotificationMainLoop = g_main_loop_new(NULL, false);
+                nTimeoutId = g_timeout_add(5000, Timeout, g_pNotificationMainLoop);
+                g_main_loop_run(g_pNotificationMainLoop);
+                g_source_remove(nTimeoutId);
+                g_pNotificationMainLoop = NULL;
        }
        return;
 }