summaryrefslogtreecommitdiff
path: root/libnm/tests/test-secret-agent.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm/tests/test-secret-agent.c')
-rw-r--r--libnm/tests/test-secret-agent.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libnm/tests/test-secret-agent.c b/libnm/tests/test-secret-agent.c
index e4ebe3e0e..77f972f59 100644
--- a/libnm/tests/test-secret-agent.c
+++ b/libnm/tests/test-secret-agent.c
@@ -599,6 +599,12 @@ test_secret_agent_auto_register (void)
g_assert_no_error (error);
g_assert (nm_secret_agent_old_get_registered (agent));
+ /* The GLib ObjectManager doesn't like when we drop the service
+ * in between it sees the service disappear and the call to
+ * GetManagedObjects. Give it a chance to do its business.
+ * Arguably a bug. */
+ g_main_context_iteration (NULL, FALSE);
+
/* Shut down test service */
nmtstc_service_cleanup (sinfo);
g_main_loop_run (loop);
@@ -609,6 +615,9 @@ test_secret_agent_auto_register (void)
g_main_loop_run (loop);
g_assert (nm_secret_agent_old_get_registered (agent));
+ /* Let ObjectManager initialize (see above). */
+ g_main_context_iteration (NULL, FALSE);
+
/* Shut down test service again */
nmtstc_service_cleanup (sinfo);
g_main_loop_run (loop);