[next] telepathy-glib: account-request test: wait for singleton account manager to be freed
Simon McVittie
smcv at kemper.freedesktop.org
Tue Mar 18 05:45:06 PDT 2014
Module: telepathy-glib
Branch: next
Commit: 82a9e4fda51587f3ea260de447cbb9cc15306694
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=82a9e4fda51587f3ea260de447cbb9cc15306694
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Mon Mar 17 15:41:56 2014 +0000
account-request test: wait for singleton account manager to be freed
For this one we can't just assert that it's the last unref, because
it holds a reference to itself while it's introspecting itself.
---
tests/dbus/account-request.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/tests/dbus/account-request.c b/tests/dbus/account-request.c
index ac4c3a1..83a5795 100644
--- a/tests/dbus/account-request.c
+++ b/tests/dbus/account-request.c
@@ -74,12 +74,8 @@ teardown (Test *test,
tp_tests_assert_last_unref (&test->ar);
- /* If we don't let it prepare before we tear down the AccountManager
- * service, then it might be invalidated between teardown and the next
- * setup by its GetAll call failing. That would be bad, because we're
- * using the global shared instance, so it could break the next test. */
- tp_tests_proxy_run_until_prepared (test->account_manager, NULL);
- g_clear_object (&test->account_manager);
+ /* It might have a GetAll() in-flight, so we have to wait */
+ tp_tests_await_last_unref (&test->account_manager);
tp_dbus_daemon_release_name (test->dbus, TP_ACCOUNT_MANAGER_BUS_NAME,
&test->error);
More information about the telepathy-commits
mailing list