forked from AuroraMiddleware/gtk
Work around g_test_dbus annoyance
Without iterating a mainloop for a bit, g_test_dbus_down() will give us an error.
This commit is contained in:
parent
4aceee71c5
commit
8f3ffe4d08
@ -411,6 +411,7 @@ main (int argc, char **argv)
|
||||
guint i;
|
||||
gchar *schema_dir;
|
||||
GTestDBus *bus;
|
||||
GMainLoop *loop;
|
||||
gint result;
|
||||
|
||||
/* These must be set before before gtk_test_init */
|
||||
@ -446,6 +447,14 @@ main (int argc, char **argv)
|
||||
|
||||
result = g_test_run();
|
||||
|
||||
/* Work around the annoying issue that g_test_dbus_down is giving
|
||||
* us an "Error while sending AddMatch" that comes out of an idle
|
||||
*/
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
g_timeout_add (1000, (GSourceFunc)g_main_loop_quit, loop);
|
||||
g_main_loop_run (loop);
|
||||
g_main_loop_unref (loop);
|
||||
|
||||
g_test_dbus_down (bus);
|
||||
g_object_unref (bus);
|
||||
g_free (schema_dir);
|
||||
|
Loading…
Reference in New Issue
Block a user