EBookClient tests: Use async apis to open the client for every async test.
authorTristan Van Berkom <tristanvb@openismus.com>
Wed, 24 Apr 2013 08:18:06 +0000 (17:18 +0900)
committerTristan Van Berkom <tristanvb@openismus.com>
Mon, 14 Oct 2013 18:55:40 +0000 (20:55 +0200)
15 files changed:
tests/libebook/client/test-client-add-and-get-async.c
tests/libebook/client/test-client-add-and-get-sync.c
tests/libebook/client/test-client-add-contact.c
tests/libebook/client/test-client-get-contact-uids.c
tests/libebook/client/test-client-get-contact.c
tests/libebook/client/test-client-get-view.c
tests/libebook/client/test-client-modify-contact.c
tests/libebook/client/test-client-refresh.c
tests/libebook/client/test-client-remove-contact-by-uid.c
tests/libebook/client/test-client-remove-contact.c
tests/libebook/client/test-client-remove-contacts.c
tests/libebook/client/test-client-revision-view.c
tests/libebook/client/test-client-suppress-notifications.c
tests/libebook/client/test-client-uid-only-view.c
tests/libebook/client/test-client-view-operations.c

index f34dd84..c1dc84a 100644 (file)
@@ -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
 
index 4f7d072..a323bbf 100644 (file)
@@ -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
 
index b3a7af5..3ff28d5 100644 (file)
@@ -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,
@@ -71,14 +72,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);
index 97b1290..012e0b4 100644 (file)
@@ -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,
@@ -99,28 +101,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);
index f11818c..2f750fc 100644 (file)
@@ -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,
@@ -74,28 +76,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);
index 846f0e2..df8fbca 100644 (file)
@@ -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,
@@ -149,28 +151,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);
index ae20908..61ae72d 100644 (file)
@@ -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"
 
@@ -135,14 +136,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);
index 654c479..b952566 100644 (file)
@@ -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
@@ -81,14 +82,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);
index f19ac00..250b8d6 100644 (file)
@@ -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,
@@ -97,14 +98,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);
index 2579a53..3153c02 100644 (file)
@@ -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,
@@ -120,14 +122,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);
@@ -138,14 +140,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);
index 5d8d4a4..51998d1 100644 (file)
@@ -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,
@@ -129,14 +130,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);
index eaf902f..ac1403d 100644 (file)
@@ -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
 
@@ -225,14 +226,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);
index d745d9e..271db70 100644 (file)
@@ -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
 
@@ -190,28 +192,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);
index 819d972..b1f973f 100644 (file)
@@ -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
 
@@ -309,14 +311,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);
@@ -324,14 +326,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);
index 86de774..e24e09b 100644 (file)
@@ -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
@@ -381,28 +383,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);