Improve gdbus test coverage
[platform/upstream/glib.git] / gio / tests / gdbus-introspection.c
index 79daacb..f2b268d 100644 (file)
@@ -310,16 +310,15 @@ main (int   argc,
   /* all the tests rely on a shared main loop */
   loop = g_main_loop_new (NULL, FALSE);
 
-  session_bus_up ();
-
   g_test_add_func ("/gdbus/introspection-parser", test_introspection_parser);
   g_test_add_func ("/gdbus/introspection-generate", test_generate);
   g_test_add_func ("/gdbus/introspection-default-direction", test_default_direction);
   g_test_add_func ("/gdbus/introspection-extra-data", test_extra_data);
 
-  ret = g_test_run ();
+  ret = session_bus_run ();
 
-  session_bus_down ();
+  while (g_main_context_iteration (NULL, FALSE));
+  g_main_loop_unref (loop);
 
   return ret;
 }