[glib/wip/gcleanup: 66/71] gdbus-proxy: Fix erroneous timeout during following tests



commit af04c27230dcd73967d63d99982d87debe83261e
Author: Stef Walter <stefw gnome org>
Date:   Sat Nov 9 20:24:02 2013 +0100

    gdbus-proxy: Fix erroneous timeout during following tests
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711809

 gio/tests/gdbus-proxy.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/gdbus-proxy.c b/gio/tests/gdbus-proxy.c
index e550b52..8587934 100644
--- a/gio/tests/gdbus-proxy.c
+++ b/gio/tests/gdbus-proxy.c
@@ -831,6 +831,8 @@ fail_test (gpointer user_data)
 static void
 test_async (void)
 {
+  guint id;
+
   g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
                             G_DBUS_PROXY_FLAGS_NONE,
                             NULL,                      /* GDBusInterfaceInfo */
@@ -844,8 +846,10 @@ test_async (void)
   /* this is safe; testserver will exit once the bus goes away */
   g_assert (g_spawn_command_line_async (g_test_get_filename (G_TEST_BUILT, "gdbus-testserver", NULL), NULL));
 
-  g_timeout_add (10000, fail_test, NULL);
+  id = g_timeout_add (10000, fail_test, NULL);
   g_main_loop_run (loop);
+
+  g_source_remove (id);
 }
 
 static void


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