summaryrefslogtreecommitdiff
path: root/libnm
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2016-10-01 19:28:11 +0200
committerLubomir Rintel <lkundrak@v3.sk>2016-11-10 16:48:48 +0100
commitbbed63213aa04b8c1296b597bc803a4af3b58682 (patch)
tree8ec3b6e7a0200af97ba2b10d0e1b677f5e8a4b88 /libnm
parent7803f6b7fa6ec36ad068484b7dfe17ba9ecd5548 (diff)
libnm/tests: work around ObjectManager bogus warning
We should eventually fix this in Gio, but I guess we need to keep the workaround for the time being anyway.
Diffstat (limited to 'libnm')
-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);