int utc_component_based_app_exit_p(void)
{
int ret;
- bool running;
+ bool running = true;
+ int retry_count = 0;
ret = __app_control_send_async(g_app_id, g_service_comp_id,
"utc_component_based_app_exit");
- assert_eq_with_exit(ret, APP_CONTROL_RESULT_SUCCEEDED);
+ assert_eq_with_exit(ret, APP_CONTROL_ERROR_NONE);
+
+ do {
+ component_manager_is_running(g_service_comp_id, &running);
+ if (!running)
+ break;
- sleep(5);
+ usleep(500000);
+ retry_count++;
+ } while (retry_count <= 10);
- ret = component_manager_is_running(g_service_comp_id, &running);
assert_eq_with_exit(running, false);
normal_exit(0);