key-file: do not use deprecated loop_run_with_non_fatal_timeout()
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Fri, 26 Jul 2013 09:48:33 +0000 (10:48 +0100)
committerPhilip Withnall <philip@tecnocode.co.uk>
Mon, 29 Jul 2013 13:30:45 +0000 (15:30 +0200)
Closes: https://bugzilla.gnome.org/show_bug.cgi?id=704922

NEWS
tests/key-file/individual-retrieval.vala

diff --git a/NEWS b/NEWS
index 8c97d3e..f23b82f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ Bugs fixed:
 • Bug 703709 — can't compile folks. fails at GISCAN TpLowlevel-0.6.gir
 • Bug 703830 — build: distcheck fails trying to delete
   libfolks_telepathy_la_vala.stamp
+• Bug 704922 — key-file: do not use deprecated loop_run_with_non_fatal_timeout()
 
 API changes:
 • Add PresenceDetails.client_types
index e6657f4..546bb46 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Copyright (C) 2011 Collabora Ltd.
+ * Copyright (C) 2011, 2013 Collabora Ltd.
+ * Copyright (C) 2013 Philip Withnall
  *
  * This library is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -15,6 +16,7 @@
  * along with this library.  If not, see <http://www.gnu.org/licenses/>.
  *
  * Authors: Travis Reitter <travis.reitter@collabora.co.uk>
+ *          Philip Withnall <philip@tecnocode.co.uk>
  */
 
 using Gee;
@@ -74,13 +76,17 @@ public class IndividualRetrievalTests : KfTest.TestCase
             {
               assert (i == null);
             }
+
+          /* Finished? */
+          if (expected_individuals.size == 0)
+              main_loop.quit ();
         });
       aggregator.prepare.begin ();
 
       /* Kill the main loop after a few seconds. If there are still individuals
        * in the set of expected individuals, the aggregator has either failed
        * or been too slow (which we can consider to be failure). */
-      TestUtils.loop_run_with_non_fatal_timeout (main_loop, 3);
+      TestUtils.loop_run_with_timeout (main_loop, 3);
 
       /* We should have enumerated exactly the individuals in the set */
       assert (expected_individuals.size == 0);
@@ -119,13 +125,17 @@ public class IndividualRetrievalTests : KfTest.TestCase
             {
               assert (i == null);
             }
+
+          /* Finished? */
+          if (individuals_changed_count == 1)
+              main_loop.quit ();
         });
       aggregator.prepare.begin ();
 
       /* Kill the main loop after a few seconds. If there are still individuals
        * in the set of expected individuals, the aggregator has either failed
        * or been too slow (which we can consider to be failure). */
-      TestUtils.loop_run_with_non_fatal_timeout (main_loop, 3);
+      TestUtils.loop_run_with_timeout (main_loop, 3);
 
       /* We should have enumerated exactly one individual */
       assert (individuals_changed_count == 1);