mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 07:26:15 +01:00
gdbus-proxy: Fix erroneous timeout during following tests
Modified by Philip Withnall to amend a second instance in the same file. https://bugzilla.gnome.org/show_bug.cgi?id=711809
This commit is contained in:
parent
767296db9c
commit
0f82ff12ea
@ -835,6 +835,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 */
|
||||
@ -848,8 +850,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
|
||||
@ -895,6 +899,7 @@ test_wellknown_noauto (void)
|
||||
{
|
||||
GError *error = NULL;
|
||||
GDBusProxy *proxy;
|
||||
guint id;
|
||||
|
||||
proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
|
||||
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
|
||||
@ -904,9 +909,10 @@ test_wellknown_noauto (void)
|
||||
g_assert (proxy != NULL);
|
||||
|
||||
g_dbus_proxy_call (proxy, "method", NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, check_error, NULL);
|
||||
g_timeout_add (10000, fail_test, NULL);
|
||||
id = g_timeout_add (10000, fail_test, NULL);
|
||||
g_main_loop_run (loop);
|
||||
g_object_unref (proxy);
|
||||
g_source_remove (id);
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user