tests: Add some missing main context iterations to gdbus-names

These were missing from the test before the previous commit ported from
`GMainLoop` to `GMainContext`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2021-06-21 14:16:03 +01:00
parent 32e8e4ad91
commit 323c5d7e21

View File

@ -773,7 +773,11 @@ test_bus_watch_name (gconstpointer d)
g_assert_cmpint (data.num_appeared, ==, 0);
g_assert_cmpint (data.num_vanished, ==, 1);
g_bus_unwatch_name (id);
while (data.num_free_func < 1)
g_main_context_iteration (main_context, TRUE);
g_assert_cmpint (data.num_appeared, ==, 0);
g_assert_cmpint (data.num_vanished, ==, 1);
g_assert_cmpint (data.num_free_func, ==, 1);
@ -845,6 +849,9 @@ test_bus_watch_name (gconstpointer d)
* Unwatch the name.
*/
g_bus_unwatch_name (id);
while (data.num_free_func < 1)
g_main_context_iteration (main_context, TRUE);
g_assert_cmpint (data.num_free_func, ==, 1);
/* unown the name */
@ -952,7 +959,11 @@ test_bus_watch_name (gconstpointer d)
g_assert_cmpint (own_data.num_lost, ==, 0);
g_assert_cmpint (data.num_vanished, ==, 1);
}
g_bus_unwatch_name (id);
while (data.num_free_func < 1)
g_main_context_iteration (main_context, TRUE);
g_assert_cmpint (data.num_free_func, ==, 1);
if (!watch_name_test->existing_service)