[evolution-data-server] Let the 'make check' pass again
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Let the 'make check' pass again
- Date: Tue, 3 Feb 2015 18:19:26 +0000 (UTC)
commit 2c69571d8ee8a94684cc27cea0be9aee56a39ab4
Author: Milan Crha <mcrha redhat com>
Date: Tue Feb 3 19:16:35 2015 +0100
Let the 'make check' pass again
Couple related changes:
a) no need to wait for a connected state in tests, it only makes thing slower
b) have larger interval for finalize wait
c) avoid memory leak (and test failure) in test-book-client-view-operations
d) update ko_KR alphabet in test-book-client-cursor-operations
e) skip test-book-client-cursor-operations from 'make check', due it being too slow
tests/book-migration/setup-migration-test.c | 2 +-
tests/libebook/client/Makefile.am | 6 +++++-
.../client/test-book-client-cursor-operations.c | 2 +-
tests/libebook/client/test-book-client-self.c | 2 +-
.../client/test-book-client-view-operations.c | 9 +++++----
tests/test-server-utils/e-test-server-utils.c | 14 +++++++-------
6 files changed, 20 insertions(+), 15 deletions(-)
---
diff --git a/tests/book-migration/setup-migration-test.c b/tests/book-migration/setup-migration-test.c
index 4cfcc36..f3e8b8a 100644
--- a/tests/book-migration/setup-migration-test.c
+++ b/tests/book-migration/setup-migration-test.c
@@ -130,7 +130,7 @@ source_added (ESourceRegistry *registry,
/* Open the address book */
#if EDS_CHECK_VERSION(3,8,0)
- added_data->book = (EBookClient *) e_book_client_connect_sync (source, 30, NULL, &error);
+ added_data->book = (EBookClient *) e_book_client_connect_sync (source, (guint32) -1, NULL, &error);
#else
/* With 3.6 it's a bit more tricky */
added_data->book = e_book_client_new (source, &error);
diff --git a/tests/libebook/client/Makefile.am b/tests/libebook/client/Makefile.am
index bbe3fc6..73cda08 100644
--- a/tests/libebook/client/Makefile.am
+++ b/tests/libebook/client/Makefile.am
@@ -58,6 +58,10 @@ TESTS = \
test-book-client-view-operations \
test-book-client-suppress-notifications \
test-book-client-cursor-create \
+ $(NULL)
+
+# Skip these from 'make check', they take too long for a quick test before release
+TESTS_SKIP = \
test-book-client-cursor-operations \
$(NULL)
@@ -65,7 +69,7 @@ TESTS = \
#
# Either they were designed as functional tests or have
# not been ported to use ETestServerFixture yet.
-noinst_PROGRAMS = $(TESTS)
+noinst_PROGRAMS = $(TESTS) $(TESTS_SKIP)
TEST_CPPFLAGS = \
$(libclient_test_utils_la_CPPFLAGS) \
diff --git a/tests/libebook/client/test-book-client-cursor-operations.c
b/tests/libebook/client/test-book-client-cursor-operations.c
index 08764b7..72daa80 100644
--- a/tests/libebook/client/test-book-client-cursor-operations.c
+++ b/tests/libebook/client/test-book-client-cursor-operations.c
@@ -2678,7 +2678,7 @@ main (gint argc,
closure = cursor_closure_new (&base_params[i], "POSIX");
cursor_closure_alphabet (closure, TRUE, "A", "B", "C", "D", "E");
cursor_closure_change_locale (closure, "ko_KR.utf8");
- cursor_closure_alphabet (closure, FALSE, "ᄀ", "ᄂ", "ᄃ", "ᄅ", "ᄆ");
+ cursor_closure_alphabet (closure, FALSE, "ㄱ", "ㄴ", "ㄷ", "ㄹ", "ㅁ");
cursor_closure_add (closure, "/EBookClientCursor/ChangeLocale/Alphabet/ko_KR%s",
base_params[i].base_path);
closure = cursor_closure_new (&base_params[i], "POSIX");
diff --git a/tests/libebook/client/test-book-client-self.c b/tests/libebook/client/test-book-client-self.c
index 8c7f438..0cfd2c3 100644
--- a/tests/libebook/client/test-book-client-self.c
+++ b/tests/libebook/client/test-book-client-self.c
@@ -56,7 +56,7 @@ test_set_self (ETestServerFixture *fixture,
/* Open the system addressbook */
source = e_source_registry_ref_builtin_address_book (fixture->registry);
- client = (EBookClient *) e_book_client_connect_sync (source, 30, NULL, &error);
+ client = (EBookClient *) e_book_client_connect_sync (source, (guint32) -1, NULL, &error);
g_object_unref (source);
if (!client)
g_error ("Error connecting to system addressbook: %s", error->message);
diff --git a/tests/libebook/client/test-book-client-view-operations.c
b/tests/libebook/client/test-book-client-view-operations.c
index 4e61469..e126750 100644
--- a/tests/libebook/client/test-book-client-view-operations.c
+++ b/tests/libebook/client/test-book-client-view-operations.c
@@ -113,6 +113,7 @@ finish_thread_test (ThreadData *data)
g_thread_join (data->thread);
g_mutex_clear (&data->complete_mutex);
g_cond_clear (&data->complete_cond);
+ g_clear_object (&data->view);
g_slice_free (ThreadData, data);
}
@@ -198,7 +199,7 @@ test_view_thread_async (ThreadData *data)
if (data->closure->type == E_TEST_SERVER_DIRECT_ADDRESS_BOOK) {
/* There is no Async API to open a direct book for now, let's stick with the sync API
*/
- data->client = (EBookClient *) e_book_client_connect_direct_sync (registry, source, 30, NULL,
&error);
+ data->client = (EBookClient *) e_book_client_connect_direct_sync (registry, source, (guint32)
-1, NULL, &error);
if (!data->client)
g_error ("Unable to create EBookClient for uid '%s': %s", data->book_uid,
error->message);
@@ -208,7 +209,7 @@ test_view_thread_async (ThreadData *data)
} else {
/* Connect asynchronously */
- e_book_client_connect (source, 30, NULL, connect_ready, data);
+ e_book_client_connect (source, (guint32) -1, NULL, connect_ready, data);
}
g_main_loop_run (data->loop);
@@ -280,9 +281,9 @@ test_view_thread_sync (ThreadData *data)
g_error ("Unable to fetch source uid '%s' from the registry", data->book_uid);
if (data->closure->type == E_TEST_SERVER_DIRECT_ADDRESS_BOOK)
- data->client = (EBookClient *) e_book_client_connect_direct_sync (registry, source, 30, NULL,
&error);
+ data->client = (EBookClient *) e_book_client_connect_direct_sync (registry, source, (guint32)
-1, NULL, &error);
else
- data->client = (EBookClient *) e_book_client_connect_sync (source, 30, NULL, &error);
+ data->client = (EBookClient *) e_book_client_connect_sync (source, (guint32) -1, NULL,
&error);
if (!data->client)
g_error ("Unable to create EBookClient for uid '%s': %s", data->book_uid, error->message);
diff --git a/tests/test-server-utils/e-test-server-utils.c b/tests/test-server-utils/e-test-server-utils.c
index 34a5808..b4ced14 100644
--- a/tests/test-server-utils/e-test-server-utils.c
+++ b/tests/test-server-utils/e-test-server-utils.c
@@ -47,7 +47,7 @@
#define ADDRESS_BOOK_SOURCE_UID "test-address-book"
#define CALENDAR_SOURCE_UID "test-calendar"
-#define FINALIZE_SECONDS 10
+#define FINALIZE_SECONDS 30
/* FIXME, currently we are unable to achieve server activation
* twice in a single test case, so we're using one D-Bus server
@@ -358,19 +358,19 @@ e_test_server_utils_source_added (ESourceRegistry *registry,
if (pair->closure->type == E_TEST_SERVER_DIRECT_ADDRESS_BOOK) {
if (pair->closure->use_async_connect)
- e_book_client_connect_direct (source, 30, NULL,
e_test_server_utils_client_ready, pair);
+ e_book_client_connect_direct (source, (guint32) -1, NULL,
e_test_server_utils_client_ready, pair);
else
pair->fixture->service.book_client = (EBookClient *)
e_book_client_connect_direct_sync (
pair->fixture->registry,
- source, 30, NULL, &error);
+ source, (guint32) -1, NULL, &error);
} else {
if (pair->closure->use_async_connect)
- e_book_client_connect (source, 30, NULL, e_test_server_utils_client_ready,
pair);
+ e_book_client_connect (source, (guint32) -1, NULL,
e_test_server_utils_client_ready, pair);
else
pair->fixture->service.book_client = (EBookClient *)
- e_book_client_connect_sync (source, 30, NULL, &error);
+ e_book_client_connect_sync (source, (guint32) -1, NULL, &error);
}
if (!pair->closure->use_async_connect &&
@@ -395,7 +395,7 @@ e_test_server_utils_source_added (ESourceRegistry *registry,
if (pair->closure->use_async_connect) {
e_cal_client_connect (
- source, pair->closure->calendar_source_type, 30,
+ source, pair->closure->calendar_source_type, (guint32) -1,
NULL, e_test_server_utils_client_ready, pair);
} else {
@@ -403,7 +403,7 @@ e_test_server_utils_source_added (ESourceRegistry *registry,
pair->fixture->service.calendar_client = (ECalClient *)
e_cal_client_connect_sync (
source,
- pair->closure->calendar_source_type, 30, NULL, &error);
+ pair->closure->calendar_source_type, (guint32) -1, NULL, &error);
if (!pair->fixture->service.calendar_client)
g_error ("Unable to create the test calendar: %s", error->message);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]