mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 14:36:13 +01:00
gio/tests/desktop-app-info: Wait until the callback is called
The test was flacky because we were only relying on the presence of a file, while the callback could have not been called yet, while ensure for both assumptions to be true before stop iterating the loop.
This commit is contained in:
parent
df239b97fb
commit
ecaa5b5b7a
@ -1118,7 +1118,7 @@ test_default_uri_handler_async (void)
|
||||
on_launch_default_for_uri_success_cb,
|
||||
&called);
|
||||
|
||||
while (!g_file_test (file_path, G_FILE_TEST_IS_REGULAR))
|
||||
while (!g_file_test (file_path, G_FILE_TEST_IS_REGULAR) || !called)
|
||||
g_main_context_iteration (NULL, FALSE);
|
||||
|
||||
g_assert_true (called);
|
||||
|
Loading…
Reference in New Issue
Block a user