summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-03-17 15:41:56 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-03-17 15:48:20 +0000
commita091aaa977f5e0129522860bb9851ac3c0135b99 (patch)
tree5655ee2c4992a9e67f183555d81ac568a23c8c94
parentce282830d25d4500946c43840e1b37ea4899889a (diff)
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.
-rw-r--r--tests/dbus/account-request.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/dbus/account-request.c b/tests/dbus/account-request.c
index ac4c3a16e..83a5795d5 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);