From e43bc1e4b33ba211712fbf0b04e29406d511e983 Mon Sep 17 00:00:00 2001 From: Gustavo Padovan Date: Fri, 26 Jul 2013 10:48:33 +0100 Subject: [PATCH] key-file: do not use deprecated loop_run_with_non_fatal_timeout() Closes: https://bugzilla.gnome.org/show_bug.cgi?id=704922 --- NEWS | 1 + tests/key-file/individual-retrieval.vala | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 8c97d3e..f23b82f 100644 --- 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 diff --git a/tests/key-file/individual-retrieval.vala b/tests/key-file/individual-retrieval.vala index e6657f4..546bb46 100644 --- a/tests/key-file/individual-retrieval.vala +++ b/tests/key-file/individual-retrieval.vala @@ -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 . * * Authors: Travis Reitter + * Philip Withnall */ 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); -- 2.7.4