[evolution-data-server] e-test-server-utils: Added DEBUG_DIRECT env var
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] e-test-server-utils: Added DEBUG_DIRECT env var
- Date: Fri, 15 Feb 2013 09:47:45 +0000 (UTC)
commit 8d80b9c69269c2723a572c09ea4ed2d2bfa5d63d
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Fri Feb 15 18:23:25 2013 +0900
e-test-server-utils: Added DEBUG_DIRECT env var
This is a temporary workaround to test Direct Read Access,
a later patch will ensure all tests check both Direct/Normal read access
modes.
tests/test-server-utils/e-test-server-utils.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/tests/test-server-utils/e-test-server-utils.c b/tests/test-server-utils/e-test-server-utils.c
index 9c5b7d0..9a2d706 100644
--- a/tests/test-server-utils/e-test-server-utils.c
+++ b/tests/test-server-utils/e-test-server-utils.c
@@ -114,13 +114,16 @@ e_test_server_utils_source_added (ESourceRegistry *registry,
if (g_strcmp0 (e_source_get_uid (source), ADDRESS_BOOK_SOURCE_UID) != 0)
return;
- pair->fixture->service.book_client = e_book_client_new (source, &error);
+ if (g_getenv ("DEBUG_DIRECT") != NULL)
+ pair->fixture->service.book_client = (EBookClient *)
+ e_book_client_connect_direct_sync (pair->fixture->registry, source, NULL,
&error);
+ else
+ pair->fixture->service.book_client = (EBookClient *)
+ e_book_client_connect_sync (source, NULL, &error);
+
if (!pair->fixture->service.book_client)
g_error ("Unable to create the test book: %s", error->message);
- if (!e_client_open_sync (E_CLIENT (pair->fixture->service.book_client), FALSE, NULL, &error))
- g_error ("Unable to open book client: %s", error->message);
-
break;
case E_TEST_SERVER_DEPRECATED_ADDRESS_BOOK:
@@ -140,15 +143,12 @@ e_test_server_utils_source_added (ESourceRegistry *registry,
if (g_strcmp0 (e_source_get_uid (source), CALENDAR_SOURCE_UID) != 0)
return;
- pair->fixture->service.calendar_client = e_cal_client_new (source,
- pair->closure->calendar_source_type,
- &error);
+ pair->fixture->service.calendar_client = (ECalClient *)
+ e_cal_client_connect_sync (source,
+ pair->closure->calendar_source_type, NULL, &error);
if (!pair->fixture->service.calendar_client)
g_error ("Unable to create the test calendar: %s", error->message);
- if (!e_client_open_sync (E_CLIENT (pair->fixture->service.calendar_client), FALSE, NULL,
&error))
- g_error ("Unable to open calendar client: %s", error->message);
-
break;
case E_TEST_SERVER_DEPRECATED_CALENDAR:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]