[next] telepathy-glib: stream-tube test: wait for idle destruction of proxy
Simon McVittie
smcv at kemper.freedesktop.org
Tue Mar 18 05:45:05 PDT 2014
Module: telepathy-glib
Branch: next
Commit: b122e8d9a7bbd6267aeec700605da76304aca6b9
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=b122e8d9a7bbd6267aeec700605da76304aca6b9
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Mon Mar 17 15:44:40 2014 +0000
stream-tube test: wait for idle destruction of proxy
---
tests/dbus/stream-tube.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/dbus/stream-tube.c b/tests/dbus/stream-tube.c
index a6b50e7..53dc93b 100644
--- a/tests/dbus/stream-tube.c
+++ b/tests/dbus/stream-tube.c
@@ -164,6 +164,13 @@ create_tube_service (Test *test,
tp_tests_proxy_run_until_dbus_queue_processed (test->tube);
g_list_free_full (test->tube_conns, g_object_unref);
test->tube_conns = NULL;
+
+ /* We have to wait for an idle to go off before asserting that it has
+ * had its last-unref, because if the proxy has just been invalidated,
+ * it holds a ref to itself until the idle disconnects all its signal
+ * connections. */
+ g_main_context_iteration (NULL, FALSE);
+
g_object_add_weak_pointer (G_OBJECT (test->tube), (gpointer) &test->tube);
g_object_unref (test->tube);
g_assert (test->tube == NULL);
More information about the telepathy-commits
mailing list