[glib/benzea/systemd-transient-scope: 154/157] tests: Iterate mainloop during launch test
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/benzea/systemd-transient-scope: 154/157] tests: Iterate mainloop during launch test
- Date: Mon, 7 Jun 2021 15:26:10 +0000 (UTC)
commit 6e476b6f8d61d380cd4b5739b7a996070731a2db
Author: Benjamin Berg <bberg redhat com>
Date: Fri Oct 23 18:20:01 2020 +0200
tests: Iterate mainloop during launch test
When launching an application, we wait for the DBus response from
systemd before executing the binary. Because of this the main loop needs
to be iterated for spawning to completed and the file to be created.
Without this the test will time out if GLib was able to connect to the
session bus.
gio/tests/desktop-app-info.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/gio/tests/desktop-app-info.c b/gio/tests/desktop-app-info.c
index fcc29c579..743230cbb 100644
--- a/gio/tests/desktop-app-info.c
+++ b/gio/tests/desktop-app-info.c
@@ -334,6 +334,7 @@ wait_for_file (const gchar *want_this,
*/
while (access (want_this, F_OK) != 0)
{
+ g_main_context_iteration (NULL, FALSE);
g_usleep (100000); /* 100ms */
g_assert_cmpuint (retries, >, 0);
retries--;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]