From: Tristan Van Berkom Date: Wed, 23 Jan 2013 06:33:01 +0000 (+0900) Subject: ECalClient test test-client-refresh: Only test the refresh APIs if it is supported. X-Git-Tag: upstream/3.7.5~150 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0582be52aae9a716f4f2b838126dd02b05bb785;p=platform%2Fupstream%2Fevolution-data-server.git ECalClient test test-client-refresh: Only test the refresh APIs if it is supported. Newer versions of the local calendar backend dont support the explicit refresh, so failing the explicit refresh is not an error. --- diff --git a/tests/libecal/client/test-client-refresh.c b/tests/libecal/client/test-client-refresh.c index b712e46..09fa048 100644 --- a/tests/libecal/client/test-client-refresh.c +++ b/tests/libecal/client/test-client-refresh.c @@ -5,7 +5,6 @@ #include #include -#include "client-test-utils.h" #include "e-test-server-utils.h" static ETestServerClosure cal_closure = @@ -38,13 +37,17 @@ test_refresh_sync (ETestServerFixture *fixture, { ECalClient *cal; GError *error = NULL; + gboolean supported; cal = E_TEST_SERVER_UTILS_SERVICE (fixture, ECalClient); - setup_cal (cal); + supported = e_client_check_refresh_supported (E_CLIENT (cal)); - g_print ("Refresh supported: %s\n", e_client_check_refresh_supported (E_CLIENT (cal)) ? "yes" : "no"); + g_print ("Refresh supported: %s\n", supported ? "yes" : "no"); + if (!supported) + return; + setup_cal (cal); if (!e_client_refresh_sync (E_CLIENT (cal), NULL, &error)) g_error ("refresh sync: %s", error->message); } @@ -71,11 +74,15 @@ test_refresh_async (ETestServerFixture *fixture, gconstpointer user_data) { ECalClient *cal; + gboolean supported; cal = E_TEST_SERVER_UTILS_SERVICE (fixture, ECalClient); - setup_cal (cal); + supported = e_client_check_refresh_supported (E_CLIENT (cal)); + if (!supported) + return; + setup_cal (cal); e_client_refresh (E_CLIENT (cal), NULL, async_refresh_result_ready, fixture->loop); g_main_loop_run (fixture->loop); }