From c040c685e9da4a1822664824e1667fe841704883 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Wed, 28 Mar 2012 16:06:31 +0200 Subject: [PATCH] Tests: terminate DBus trafic with the connection before removing its account Otherwise unit tests gets racy. --- tests/lib/telepathy/contactlist/backend.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/lib/telepathy/contactlist/backend.c b/tests/lib/telepathy/contactlist/backend.c index 5defd35..daf3806 100644 --- a/tests/lib/telepathy/contactlist/backend.c +++ b/tests/lib/telepathy/contactlist/backend.c @@ -317,6 +317,9 @@ tp_tests_backend_remove_account (TpTestsBackend *self, priv->accounts = g_list_remove (priv->accounts, handle); data = (AccountData *) handle; + /* Make sure all dbus trafic with account's connection is done */ + tp_tests_proxy_run_until_dbus_queue_processed (data->client_conn); + /* Remove the account from the account manager */ tp_tests_simple_account_manager_remove_account (priv->account_manager, data->object_path); @@ -340,7 +343,7 @@ tp_tests_backend_tear_down (TpTestsBackend *self) TpTestsBackendPrivate *priv = self->priv; GError *error = NULL; - /* Make sure all dbus trafic is done */ + /* Make sure all dbus trafic with AM is done */ tp_tests_proxy_run_until_dbus_queue_processed (priv->client_am); g_clear_object (&priv->client_am); -- 2.7.4