[evolution-data-server] ECalClient test test-client-refresh: Only test the refresh APIs if it is supported.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] ECalClient test test-client-refresh: Only test the refresh APIs if it is supported.
- Date: Wed, 23 Jan 2013 06:36:13 +0000 (UTC)
commit f0582be52aae9a716f4f2b838126dd02b05bb785
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Wed Jan 23 15:33:01 2013 +0900
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.
tests/libecal/client/test-client-refresh.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
---
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 <libecal/libecal.h>
#include <libical/ical.h>
-#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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]