mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 16:32:18 +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:
		| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user