=?utf-8?q?=5Bfolks=5D_Bug_691382_=E2=80=94_Restore_tests_disabled_by_bug_?= =?utf-8?q?=23668415_=28which_has_been_fixed=29?=
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Bug 691382 â Restore tests disabled by bug #668415 (which has been fixed)
- Date: Thu, 10 Jan 2013 01:50:07 +0000 (UTC)
commit 321927a49b34febe9d6a995cb0f1839c3f5fff68
Author: Travis Reitter <travis reitter collabora co uk>
Date: Sun Jan 6 22:27:27 2013 -0800
Bug 691382 â Restore tests disabled by bug #668415 (which has been fixed)
This ports the store-removed test to the current EDS introspection bindings
and removes the change-primary-store test on the basis that we don't really
support clients changing the primary store.
In the future, we may want to add a test to ensure we cope with the primary
store disappearing, but that's a different case.
Closes: https://bugzilla.gnome.org/show_bug.cgi?id=691382
NEWS | 1 +
tests/eds/Makefile.am | 25 +-----
tests/eds/change-primary-store.vala | 146 -----------------------------------
tests/eds/store-removed.vala | 20 ++----
tests/lib/eds/backend.vala | 5 +-
5 files changed, 16 insertions(+), 181 deletions(-)
---
diff --git a/NEWS b/NEWS
index 277a89a..6cf7faa 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,7 @@ Bugs fixed:
â Bug 690876 â eds: fix various test failures
â Bug 691167 â Build failure: key-file tests built before dependencies
â Bug 686695 â support nickname in add_persona_from_details
+â Bug 691382 â Restore tests disabled by bug #668415 (which has been fixed)
API changes:
â Add Backend.enable_persona_store and disable_persona_store.
diff --git a/tests/eds/Makefile.am b/tests/eds/Makefile.am
index 655aeca..b5a8723 100644
--- a/tests/eds/Makefile.am
+++ b/tests/eds/Makefile.am
@@ -41,11 +41,6 @@ AM_VALAFLAGS = \
-g \
$(NULL)
-# FIXME: these tests have been removed temporarily due to bgo#668415
-# store-removed \
-# change-primary-store \
-# $(NULL)
-
# in order from least to most complex
noinst_PROGRAMS = \
persona-store-tests \
@@ -77,6 +72,7 @@ noinst_PROGRAMS = \
set-roles \
linkable-properties \
link-personas-diff-stores \
+ store-removed \
anti-linking \
enable-disable-stores \
create-remove-stores \
@@ -98,11 +94,6 @@ TESTS_ENVIRONMENT = \
TESTS = $(noinst_PROGRAMS)
-# FIXME: temporarily removed due to bgo#668415
-#store_removed_SOURCES = \
-# store-removed.vala \
-# $(NULL)
-
anti_linking_SOURCES = \
anti-linking.vala \
$(NULL)
@@ -219,11 +210,6 @@ set_roles_SOURCES = \
set-roles.vala \
$(NULL)
-# FIXME: temporarily removed due to bgo#668415
-#change_primary_store_SOURCES = \
-# change-primary-store.vala \
-# $(NULL)
-
link_personas_diff_stores_SOURCES = \
link-personas-diff-stores.vala \
$(NULL)
@@ -240,17 +226,16 @@ set_is_favourite_SOURCES = \
set-is-favourite.vala \
$(NULL)
+store_removed_SOURCES = \
+ store-removed.vala \
+ $(NULL)
+
CLEANFILES = \
*.pid \
*.address \
$(TESTS) \
$(NULL)
-# FIXME: temporarily removed due to bgo#668415
-# store_removed_vala.stamp \
-# change_primary_store_vala.stamp \
-# $(NULL)
-
MAINTAINERCLEANFILES = \
$(addsuffix .c,$(noinst_PROGRAMS)) \
$(addsuffix _vala.stamp,$(subst -,_,$(noinst_PROGRAMS))) \
diff --git a/tests/eds/store-removed.vala b/tests/eds/store-removed.vala
index db3911a..b8c99a5 100644
--- a/tests/eds/store-removed.vala
+++ b/tests/eds/store-removed.vala
@@ -19,6 +19,7 @@
*/
using EdsTest;
+using E;
using Folks;
using Gee;
@@ -70,7 +71,7 @@ public class StoreRemovedTests : Folks.TestCase
this._eds_backend.add_contact (c1);
/* Schedule the test to start with the main loop. */
- this._test_single_store_part1_async ();
+ this._test_single_store_part1_async.begin ();
var timeout_id = Timeout.add_seconds (5, () =>
{
@@ -83,10 +84,10 @@ public class StoreRemovedTests : Folks.TestCase
/* We should have a single individual by now. */
assert (this._aggregator.individuals.size == 1);
- Source.remove (timeout_id);
+ GLib.Source.remove (timeout_id);
/* Part 2, where we remove the address book. */
- this._test_single_store_part2_async ();
+ this._test_single_store_part2_async.begin ();
timeout_id = Timeout.add_seconds (5, () =>
{
@@ -99,7 +100,7 @@ public class StoreRemovedTests : Folks.TestCase
/* The individual should be gone. */
assert (this._aggregator.individuals.size == 0);
- Source.remove (timeout_id);
+ GLib.Source.remove (timeout_id);
}
private async void _test_single_store_part1_async ()
@@ -181,16 +182,7 @@ public class StoreRemovedTests : Folks.TestCase
/* Tear down the backend. This should remove all individuals. We check
* for this above. */
- E.SourceList? source_list = null;
- try
- {
- E.BookClient.get_sources (out source_list);
- source_list.remove_source_by_uid (this._eds_backend.address_book_uid);
- }
- catch (GLib.Error e1)
- {
- critical ("Error getting source list: %s", e1.message);
- }
+ this._eds_backend.tear_down ();
}
}
diff --git a/tests/lib/eds/backend.vala b/tests/lib/eds/backend.vala
index 202c7dc..40a04f2 100644
--- a/tests/lib/eds/backend.vala
+++ b/tests/lib/eds/backend.vala
@@ -327,7 +327,10 @@ public class EdsTest.Backend
try
{
- this._source_file.delete ();
+ if (this._source_file != null)
+ {
+ this._source_file.delete ();
+ }
}
catch (GLib.Error e)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]