[evolution-data-server/openismus-work-master: 3/41] EBookClient tests: Use async apis to open the client for every async test.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work-master: 3/41] EBookClient tests: Use async apis to open the client for every async test.
- Date: Fri, 7 Jun 2013 13:50:18 +0000 (UTC)
commit 792aeb8639e244e62666aaf981d0514fdbc66cb7
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Wed Apr 24 17:18:06 2013 +0900
EBookClient tests: Use async apis to open the client for every async test.
.../client/test-client-add-and-get-async.c | 2 +-
.../libebook/client/test-client-add-and-get-sync.c | 2 +-
tests/libebook/client/test-client-add-contact.c | 7 ++++---
.../libebook/client/test-client-get-contact-uids.c | 14 ++++++++------
tests/libebook/client/test-client-get-contact.c | 14 ++++++++------
tests/libebook/client/test-client-get-view.c | 14 ++++++++------
tests/libebook/client/test-client-modify-contact.c | 7 ++++---
tests/libebook/client/test-client-refresh.c | 7 ++++---
.../client/test-client-remove-contact-by-uid.c | 7 ++++---
tests/libebook/client/test-client-remove-contact.c | 14 ++++++++------
.../libebook/client/test-client-remove-contacts.c | 7 ++++---
tests/libebook/client/test-client-revision-view.c | 7 ++++---
.../client/test-client-suppress-notifications.c | 14 ++++++++------
tests/libebook/client/test-client-uid-only-view.c | 14 ++++++++------
.../libebook/client/test-client-view-operations.c | 14 ++++++++------
15 files changed, 82 insertions(+), 62 deletions(-)
---
diff --git a/tests/libebook/client/test-client-add-and-get-async.c
b/tests/libebook/client/test-client-add-and-get-async.c
index 2f48767..6573d2c 100644
--- a/tests/libebook/client/test-client-add-and-get-async.c
+++ b/tests/libebook/client/test-client-add-and-get-async.c
@@ -6,7 +6,7 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, TRUE };
#define N_CONTACTS 5
diff --git a/tests/libebook/client/test-client-add-and-get-sync.c
b/tests/libebook/client/test-client-add-and-get-sync.c
index 45ecec5..ec49b9a 100644
--- a/tests/libebook/client/test-client-add-and-get-sync.c
+++ b/tests/libebook/client/test-client-add-and-get-sync.c
@@ -6,7 +6,7 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, FALSE };
#define N_CONTACTS 6
diff --git a/tests/libebook/client/test-client-add-contact.c b/tests/libebook/client/test-client-add-contact.c
index 62fc0a9..ccff825 100644
--- a/tests/libebook/client/test-client-add-contact.c
+++ b/tests/libebook/client/test-client-add-contact.c
@@ -6,7 +6,8 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure_sync = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, FALSE };
+static ETestServerClosure book_closure_async = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, TRUE };
static void
test_add_contact_sync (ETestServerFixture *fixture,
@@ -74,14 +75,14 @@ main (gint argc,
g_test_add (
"/EBookClient/AddContact/Sync",
ETestServerFixture,
- &book_closure,
+ &book_closure_sync,
e_test_server_utils_setup,
test_add_contact_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/AddContact/Async",
ETestServerFixture,
- &book_closure,
+ &book_closure_async,
e_test_server_utils_setup,
test_add_contact_async,
e_test_server_utils_teardown);
diff --git a/tests/libebook/client/test-client-get-contact-uids.c
b/tests/libebook/client/test-client-get-contact-uids.c
index c7f435f..3f3725b 100644
--- a/tests/libebook/client/test-client-get-contact-uids.c
+++ b/tests/libebook/client/test-client-get-contact-uids.c
@@ -6,8 +6,10 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
-static ETestServerClosure direct_book_closure = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure_sync = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
FALSE };
+static ETestServerClosure book_closure_async = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
TRUE };
+static ETestServerClosure book_closure_direct_sync = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0, FALSE,
NULL, FALSE };
+static ETestServerClosure book_closure_direct_async = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0, FALSE,
NULL, TRUE };
static void
test_get_contact_uids_sync (ETestServerFixture *fixture,
@@ -102,28 +104,28 @@ main (gint argc,
g_test_add (
"/EBookClient/GetContactUids/Sync",
ETestServerFixture,
- &book_closure,
+ &book_closure_sync,
e_test_server_utils_setup,
test_get_contact_uids_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/GetContactUids/Async",
ETestServerFixture,
- &book_closure,
+ &book_closure_async,
e_test_server_utils_setup,
test_get_contact_uids_async,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/DirectAccess/GetContactUids/Sync",
ETestServerFixture,
- &direct_book_closure,
+ &book_closure_direct_sync,
e_test_server_utils_setup,
test_get_contact_uids_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/DirectAccess/GetContactUids/Async",
ETestServerFixture,
- &direct_book_closure,
+ &book_closure_direct_async,
e_test_server_utils_setup,
test_get_contact_uids_async,
e_test_server_utils_teardown);
diff --git a/tests/libebook/client/test-client-get-contact.c b/tests/libebook/client/test-client-get-contact.c
index 831e050..7ccca7d 100644
--- a/tests/libebook/client/test-client-get-contact.c
+++ b/tests/libebook/client/test-client-get-contact.c
@@ -6,8 +6,10 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
-static ETestServerClosure direct_book_closure = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure_sync = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
FALSE };
+static ETestServerClosure book_closure_async = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
TRUE };
+static ETestServerClosure book_closure_direct_sync = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0, FALSE,
NULL, FALSE };
+static ETestServerClosure book_closure_direct_async = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0, FALSE,
NULL, TRUE };
static void
test_get_contact_sync (ETestServerFixture *fixture,
@@ -77,28 +79,28 @@ main (gint argc,
g_test_add (
"/EBookClient/GetContact/Sync",
ETestServerFixture,
- &book_closure,
+ &book_closure_sync,
e_test_server_utils_setup,
test_get_contact_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/GetContact/Async",
ETestServerFixture,
- &book_closure,
+ &book_closure_async,
e_test_server_utils_setup,
test_get_contact_async,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/DirectAccess/GetContact/Sync",
ETestServerFixture,
- &direct_book_closure,
+ &book_closure_direct_sync,
e_test_server_utils_setup,
test_get_contact_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/DirectAccess/GetContact/Async",
ETestServerFixture,
- &direct_book_closure,
+ &book_closure_direct_async,
e_test_server_utils_setup,
test_get_contact_async,
e_test_server_utils_teardown);
diff --git a/tests/libebook/client/test-client-get-view.c b/tests/libebook/client/test-client-get-view.c
index 2917447..2a520af 100644
--- a/tests/libebook/client/test-client-get-view.c
+++ b/tests/libebook/client/test-client-get-view.c
@@ -6,8 +6,10 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
-static ETestServerClosure direct_book_closure = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure_sync = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
FALSE };
+static ETestServerClosure book_closure_async = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
TRUE };
+static ETestServerClosure book_closure_direct_sync = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0, FALSE,
NULL, FALSE };
+static ETestServerClosure book_closure_direct_async = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0, FALSE,
NULL, TRUE };
static void
objects_added (EBookClientView *view,
@@ -152,28 +154,28 @@ main (gint argc,
g_test_add (
"/EBookClient/GetBookClientView/Sync",
ETestServerFixture,
- &book_closure,
+ &book_closure_sync,
e_test_server_utils_setup,
test_get_view_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/GetBookClientView/Async",
ETestServerFixture,
- &book_closure,
+ &book_closure_async,
e_test_server_utils_setup,
test_get_view_async,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/DirectAccess/GetBookClientView/Sync",
ETestServerFixture,
- &direct_book_closure,
+ &book_closure_direct_sync,
e_test_server_utils_setup,
test_get_view_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/DirectAccess/GetBookClientView/Async",
ETestServerFixture,
- &direct_book_closure,
+ &book_closure_direct_async,
e_test_server_utils_setup,
test_get_view_async,
e_test_server_utils_teardown);
diff --git a/tests/libebook/client/test-client-modify-contact.c
b/tests/libebook/client/test-client-modify-contact.c
index 4d2fc41..7216531 100644
--- a/tests/libebook/client/test-client-modify-contact.c
+++ b/tests/libebook/client/test-client-modify-contact.c
@@ -6,7 +6,8 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure_sync = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, FALSE };
+static ETestServerClosure book_closure_async = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, TRUE };
#define EMAIL_ADD "foo bar com"
@@ -138,14 +139,14 @@ main (gint argc,
g_test_add (
"/EBookClient/ModifyContact/Sync",
ETestServerFixture,
- &book_closure,
+ &book_closure_sync,
e_test_server_utils_setup,
test_modify_contact_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/ModifyContact/Async",
ETestServerFixture,
- &book_closure,
+ &book_closure_async,
e_test_server_utils_setup,
test_modify_contact_async,
e_test_server_utils_teardown);
diff --git a/tests/libebook/client/test-client-refresh.c b/tests/libebook/client/test-client-refresh.c
index 75a0276..27c6de7 100644
--- a/tests/libebook/client/test-client-refresh.c
+++ b/tests/libebook/client/test-client-refresh.c
@@ -7,7 +7,8 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure_sync = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, FALSE };
+static ETestServerClosure book_closure_async = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, TRUE };
/* asynchronous callback with a main-loop running */
static void
@@ -84,14 +85,14 @@ main (gint argc,
g_test_add (
"/EBookClient/Refresh/Sync",
ETestServerFixture,
- &book_closure,
+ &book_closure_sync,
e_test_server_utils_setup,
test_refresh_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/Refresh/Async",
ETestServerFixture,
- &book_closure,
+ &book_closure_async,
e_test_server_utils_setup,
test_refresh_async,
e_test_server_utils_teardown);
diff --git a/tests/libebook/client/test-client-remove-contact-by-uid.c
b/tests/libebook/client/test-client-remove-contact-by-uid.c
index e2abde8..23a98e7 100644
--- a/tests/libebook/client/test-client-remove-contact-by-uid.c
+++ b/tests/libebook/client/test-client-remove-contact-by-uid.c
@@ -5,7 +5,8 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure_sync = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, FALSE };
+static ETestServerClosure book_closure_async = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, TRUE };
static void
test_remove_contact_by_uid_sync (ETestServerFixture *fixture,
@@ -100,14 +101,14 @@ main (gint argc,
g_test_add (
"/EBookClient/RemoveContactByUid/Sync",
ETestServerFixture,
- &book_closure,
+ &book_closure_sync,
e_test_server_utils_setup,
test_remove_contact_by_uid_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/RemoveContactByUid/Async",
ETestServerFixture,
- &book_closure,
+ &book_closure_async,
e_test_server_utils_setup,
test_remove_contact_by_uid_async,
e_test_server_utils_teardown);
diff --git a/tests/libebook/client/test-client-remove-contact.c
b/tests/libebook/client/test-client-remove-contact.c
index 52ae74a..bfd3478 100644
--- a/tests/libebook/client/test-client-remove-contact.c
+++ b/tests/libebook/client/test-client-remove-contact.c
@@ -6,8 +6,10 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
-static ETestServerClosure direct_book_closure = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure_sync = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
FALSE };
+static ETestServerClosure book_closure_async = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
TRUE };
+static ETestServerClosure book_closure_direct_sync = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0, FALSE,
NULL, FALSE };
+static ETestServerClosure book_closure_direct_async = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0, FALSE,
NULL, TRUE };
static void
check_removed_contact (EBookClient *book_client,
@@ -123,14 +125,14 @@ main (gint argc,
g_test_add (
"/EBookClient/RemoveContact/Sync",
ETestServerFixture,
- &book_closure,
+ &book_closure_sync,
e_test_server_utils_setup,
test_remove_contact_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/RemoveContact/Async",
ETestServerFixture,
- &book_closure,
+ &book_closure_async,
e_test_server_utils_setup,
test_remove_contact_async,
e_test_server_utils_teardown);
@@ -141,14 +143,14 @@ main (gint argc,
g_test_add (
"/EBookClient/DirectAccess/RemoveContact/Sync",
ETestServerFixture,
- &direct_book_closure,
+ &book_closure_direct_sync,
e_test_server_utils_setup,
test_remove_contact_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/DirectAccess/RemoveContact/Async",
ETestServerFixture,
- &direct_book_closure,
+ &book_closure_direct_async,
e_test_server_utils_setup,
test_remove_contact_async,
e_test_server_utils_teardown);
diff --git a/tests/libebook/client/test-client-remove-contacts.c
b/tests/libebook/client/test-client-remove-contacts.c
index eb1fb16..3c6696b 100644
--- a/tests/libebook/client/test-client-remove-contacts.c
+++ b/tests/libebook/client/test-client-remove-contacts.c
@@ -5,7 +5,8 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure_sync = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, FALSE };
+static ETestServerClosure book_closure_async = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, TRUE };
static void
check_removed (EBookClient *book_client,
@@ -132,14 +133,14 @@ main (gint argc,
g_test_add (
"/EBookClient/RemoveContacts/Sync",
ETestServerFixture,
- &book_closure,
+ &book_closure_sync,
e_test_server_utils_setup,
test_remove_contacts_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/RemoveContacts/Async",
ETestServerFixture,
- &book_closure,
+ &book_closure_async,
e_test_server_utils_setup,
test_remove_contacts_async,
e_test_server_utils_teardown);
diff --git a/tests/libebook/client/test-client-revision-view.c
b/tests/libebook/client/test-client-revision-view.c
index 88a72ec..f740832 100644
--- a/tests/libebook/client/test-client-revision-view.c
+++ b/tests/libebook/client/test-client-revision-view.c
@@ -6,7 +6,8 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure_sync = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, FALSE };
+static ETestServerClosure book_closure_async = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL, TRUE };
#define N_TEST_CONTACTS 4
@@ -228,14 +229,14 @@ main (gint argc,
g_test_add (
"/EBookClient/RevisionView/Sync",
ETestServerFixture,
- &book_closure,
+ &book_closure_sync,
e_test_server_utils_setup,
test_revision_view_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/RevisionView/Async",
ETestServerFixture,
- &book_closure,
+ &book_closure_async,
e_test_server_utils_setup,
test_revision_view_async,
e_test_server_utils_teardown);
diff --git a/tests/libebook/client/test-client-suppress-notifications.c
b/tests/libebook/client/test-client-suppress-notifications.c
index fd6bf2e..23bb18f 100644
--- a/tests/libebook/client/test-client-suppress-notifications.c
+++ b/tests/libebook/client/test-client-suppress-notifications.c
@@ -6,8 +6,10 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
-static ETestServerClosure direct_book_closure = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure_sync = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
FALSE };
+static ETestServerClosure book_closure_async = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
TRUE };
+static ETestServerClosure book_closure_direct_sync = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0, FALSE,
NULL, FALSE };
+static ETestServerClosure book_closure_direct_async = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0, FALSE,
NULL, TRUE };
#define NOTIFICATION_WAIT 2000
@@ -193,28 +195,28 @@ main (gint argc,
g_test_add (
"/EBookClient/SuppressNotifications/Sync",
ETestServerFixture,
- &book_closure,
+ &book_closure_sync,
e_test_server_utils_setup,
test_suppress_notifications_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/SuppressNotifications/Async",
ETestServerFixture,
- &book_closure,
+ &book_closure_async,
e_test_server_utils_setup,
test_suppress_notifications_async,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/DirectAccess/SuppressNotifications/Sync",
ETestServerFixture,
- &direct_book_closure,
+ &book_closure_direct_sync,
e_test_server_utils_setup,
test_suppress_notifications_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/DirectAccess/SuppressNotifications/Async",
ETestServerFixture,
- &direct_book_closure,
+ &book_closure_direct_async,
e_test_server_utils_setup,
test_suppress_notifications_async,
e_test_server_utils_teardown);
diff --git a/tests/libebook/client/test-client-uid-only-view.c
b/tests/libebook/client/test-client-uid-only-view.c
index a989c4e..53ed75c 100644
--- a/tests/libebook/client/test-client-uid-only-view.c
+++ b/tests/libebook/client/test-client-uid-only-view.c
@@ -11,8 +11,10 @@ typedef struct {
gboolean uids_only;
} UIDOnlyClosure;
-static UIDOnlyClosure book_closure_all_data = { { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 }, FALSE };
-static UIDOnlyClosure book_closure_uids_only = { { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 }, TRUE };
+static UIDOnlyClosure book_closure_all_data_sync = { { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
FALSE }, FALSE };
+static UIDOnlyClosure book_closure_all_data_async = { { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
TRUE }, FALSE };
+static UIDOnlyClosure book_closure_uids_only_sync = { { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
FALSE }, TRUE };
+static UIDOnlyClosure book_closure_uids_only_async = { { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
TRUE }, TRUE };
#define N_TEST_CONTACTS 4
@@ -312,14 +314,14 @@ main (gint argc,
g_test_add (
"/EBookClient/UidOnlyView/Sync/AllData",
ETestServerFixture,
- &book_closure_all_data,
+ &book_closure_all_data_sync,
e_test_server_utils_setup,
test_get_view_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/UidOnlyView/Sync/UidsOnly",
ETestServerFixture,
- &book_closure_uids_only,
+ &book_closure_uids_only_sync,
e_test_server_utils_setup,
test_get_view_sync,
e_test_server_utils_teardown);
@@ -327,14 +329,14 @@ main (gint argc,
g_test_add (
"/EBookClient/UidOnlyView/Async/AllData",
ETestServerFixture,
- &book_closure_all_data,
+ &book_closure_all_data_async,
e_test_server_utils_setup,
test_get_view_async,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/UidOnlyView/Async/UidsOnly",
ETestServerFixture,
- &book_closure_uids_only,
+ &book_closure_uids_only_async,
e_test_server_utils_setup,
test_get_view_async,
e_test_server_utils_teardown);
diff --git a/tests/libebook/client/test-client-view-operations.c
b/tests/libebook/client/test-client-view-operations.c
index 54699d5..2e6525c 100644
--- a/tests/libebook/client/test-client-view-operations.c
+++ b/tests/libebook/client/test-client-view-operations.c
@@ -8,8 +8,10 @@
#include "client-test-utils.h"
#include "e-test-server-utils.h"
-static ETestServerClosure book_closure = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0 };
-static ETestServerClosure direct_book_closure = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0 };
+static ETestServerClosure book_closure_sync = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
FALSE };
+static ETestServerClosure book_closure_async = { E_TEST_SERVER_ADDRESS_BOOK, NULL, 0, FALSE, NULL,
TRUE };
+static ETestServerClosure book_closure_direct_sync = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0, FALSE,
NULL, FALSE };
+static ETestServerClosure book_closure_direct_async = { E_TEST_SERVER_DIRECT_ADDRESS_BOOK, NULL, 0, FALSE,
NULL, TRUE };
#define N_THREADS 5
#define N_CONTACTS 5
@@ -384,28 +386,28 @@ main (gint argc,
g_test_add (
"/EBookClient/ConcurrentViews/Sync",
ETestServerFixture,
- &book_closure,
+ &book_closure_sync,
e_test_server_utils_setup,
test_concurrent_views_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/ConcurrentViews/Async",
ETestServerFixture,
- &book_closure,
+ &book_closure_async,
e_test_server_utils_setup,
test_concurrent_views_async,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/DirectAccess/ConcurrentViews/Sync",
ETestServerFixture,
- &direct_book_closure,
+ &book_closure_direct_sync,
e_test_server_utils_setup,
test_concurrent_views_sync,
e_test_server_utils_teardown);
g_test_add (
"/EBookClient/DirectAccess/ConcurrentViews/Async",
ETestServerFixture,
- &direct_book_closure,
+ &book_closure_direct_async,
e_test_server_utils_setup,
test_concurrent_views_async,
e_test_server_utils_teardown);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]