=?utf-8?q?=5Bfolks=5D_Bug_682719_=E2=80=94_eds_test_fails_to_compile?=



commit 2dcbc92fc2707a96ea10ac70204544b7df42b143
Author: Philip Withnall <philip tecnocode co uk>
Date:   Wed Aug 29 00:04:31 2012 +0100

    Bug 682719 â eds test fails to compile
    
    Donât use deprecated EDS API in the EDS tests. The replacement API doesnât
    require a dependency version bump.
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=682719

 NEWS                       |    1 +
 tests/lib/eds/backend.vala |   30 ++++++++++++------------------
 2 files changed, 13 insertions(+), 18 deletions(-)
---
diff --git a/NEWS b/NEWS
index 908251e..86e828a 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ Bugs fixed:
 â Bug 682572 â Build failures due to accessing static members
 â Bug 682346 â build: Make telepathy backend optional
 â Bug 682809 â Lazy instantiation of multi-valued properties
+â Bug 682719 â eds test fails to compile
 
 Overview of changes from libfolks 0.7.2 to libfolks 0.7.3
 =========================================================
diff --git a/tests/lib/eds/backend.vala b/tests/lib/eds/backend.vala
index fdba091..f64d9e2 100644
--- a/tests/lib/eds/backend.vala
+++ b/tests/lib/eds/backend.vala
@@ -274,25 +274,19 @@ public class EdsTest.Backend
       Environment.set_variable ("FOLKS_BACKEND_EDS_USE_ADDRESS_BOOKS",
                                 "", true);
 
-      /* Use the async remove method because the sync method currently hangs. */
-      this._addressbook.remove.begin (null, (o, r) =>
+      try
         {
-          try
-            {
-              var ret = this._addressbook.remove.end (r);
-              if (ret == false)
-                {
-                  GLib.warning ("remove() addressbook returned false on %s\n",
-                      this._addressbook_name);
-                }
-              this._addressbook = null;
-            }
-          catch (GLib.Error e)
-            {
-              GLib.warning ("Unable to remove addressbook %s because: %s\n",
-                  this._addressbook_name, e.message);
-            }
-        });
+          this._source.remove_sync ();
+        }
+      catch (GLib.Error e)
+        {
+          GLib.warning ("Unable to remove addressbook â%sâ: %s",
+              this._addressbook_name, e.message);
+        }
+      finally
+        {
+          this._addressbook = null;
+        }
     }
 
   private Gee.HashMap<string, string> _parse_addrs (string addr_s)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]