[ITC][sync-manager][Non-ACR][arranged waiting function for watching whether callback...
authorIckhee Woo <ickhee.woo@samsung.com>
Tue, 7 Jun 2016 00:41:56 +0000 (09:41 +0900)
committerIckhee Woo <ickhee.woo@samsung.com>
Tue, 7 Jun 2016 05:16:10 +0000 (22:16 -0700)
Change-Id: I6ebe3b721f68cf5c25ed92d00f4835f935588602
Signed-off-by: Ickhee Woo <ickhee.woo@samsung.com>
src/itc/sync-manager/ITs-sync-manager.c

index 17b7b6c..273990a 100755 (executable)
@@ -179,6 +179,10 @@ int ITc_sync_manager_add_remove_on_demand_sync_job_p(void)
        nRet = sync_manager_remove_sync_job(nSyncJobId);
        PRINT_RESULT_CLEANUP(SYNC_ERROR_NONE, nRet, "sync_manager_remove_sync_job", SyncManagerGetError(nRet), DestroySetup());
 
+       g_bCallbackHit = false;
+       WaitForAsync();
+       PRINT_RESULT_CLEANUP(true, g_bCallbackHit, "sync_manager_add_remove_on_demand_sync_job", "CallBack Not Invoked", sync_manager_remove_sync_job(nSyncJobId); DestroySetup());
+
        nRet = DestroySetup();
        PRINT_RESULT(0, nRet, "DestroySetup", "Return Value Not Correct");
 
@@ -327,8 +331,8 @@ int ITc_sync_manager_foreach_sync_job_p(void)
        nRet = CreateSetup();
        PRINT_RESULT(0, nRet, "CreateSetup", "Return Value Not Correct");
 
-       nRet = sync_manager_on_demand_sync_job(g_hAccount, SYNCJOBNAME, SYNC_OPTION_NONE, g_pBundle, &nSyncJobId);
-       PRINT_RESULT_CLEANUP(SYNC_ERROR_NONE, nRet, "sync_manager_on_demand_sync_job", SyncManagerGetError(nRet), DestroySetup());
+       nRet = sync_manager_add_periodic_sync_job(g_hAccount, SYNCJOBNAME, SYNC_PERIOD_INTERVAL_30MIN, SYNC_OPTION_NONE, g_pBundle, &nSyncJobId);
+       PRINT_RESULT_CLEANUP(SYNC_ERROR_NONE, nRet, "sync_manager_add_periodic_sync_job", SyncManagerGetError(nRet), DestroySetup());
 
        g_bCallbackHit = false;
        nRet = sync_manager_foreach_sync_job(SyncAdaptorForeachCallback, NULL);