[folks] Tests: terminate DBus trafic with the connection before removing its account



commit c040c685e9da4a1822664824e1667fe841704883
Author: Xavier Claessens <xavier claessens collabora co uk>
Date:   Wed Mar 28 16:06:31 2012 +0200

    Tests: terminate DBus trafic with the connection before removing its account
    
    Otherwise unit tests gets racy.

 tests/lib/telepathy/contactlist/backend.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]