diff --git a/gio/tests/gdbus-connection.c b/gio/tests/gdbus-connection.c index fa726e6d6..a041acbdf 100644 --- a/gio/tests/gdbus-connection.c +++ b/gio/tests/gdbus-connection.c @@ -1000,9 +1000,6 @@ test_connection_filter (void) g_assert_cmpint (data.num_handled, ==, 4); g_assert_cmpint (data.num_outgoing, ==, 4); - /* 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)); - /* wait for service to be available */ signal_handler_id = g_dbus_connection_signal_subscribe (c, "org.freedesktop.DBus", /* sender */ @@ -1015,6 +1012,10 @@ test_connection_filter (void) NULL, NULL); g_assert_cmpint (signal_handler_id, !=, 0); + + /* 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)); + timeout_mainloop_id = g_timeout_add (30000, test_connection_filter_on_timeout, NULL); g_main_loop_run (loop); g_source_remove (timeout_mainloop_id);