summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFabrice Bellet <fabrice@bellet.info>2016-06-21 23:58:20 +0200
committerOlivier CrĂȘte <olivier.crete@collabora.com>2016-06-23 18:49:56 -0400
commit7e2eb6ad2402eee80fd4adc8b62b9d0f15905e7d (patch)
tree55aa02c047dcd28c2e5d06ebf8a5d14e699d91d3 /tests
parentea3d7e0de9568a4ec54a05e102ba4880cb825792 (diff)
downloadlibnice-7e2eb6ad2402eee80fd4adc8b62b9d0f15905e7d.tar.gz
test-turn: wait for gathering done sequentially
Fixes a bug in the logic of the wait loop, where only a single gathering done was required to exit the loop, the other was caught by the following assert. Differential Revision: https://phabricator.freedesktop.org/D1110
Diffstat (limited to 'tests')
-rw-r--r--tests/test-turn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-turn.c b/tests/test-turn.c
index 46d1bf2..c466261 100644
--- a/tests/test-turn.c
+++ b/tests/test-turn.c
@@ -224,9 +224,11 @@ run_test(guint turn_port, gboolean is_ipv6,
g_assert (global_lagent_gathering_done == FALSE);
g_assert (global_ragent_gathering_done == FALSE);
g_debug ("test-turn: Added streams, running context until 'candidate-gathering-done'...");
- while (!global_lagent_gathering_done && !global_ragent_gathering_done)
+ while (!global_lagent_gathering_done)
g_main_context_iteration (NULL, TRUE);
g_assert (global_lagent_gathering_done == TRUE);
+ while (!global_ragent_gathering_done)
+ g_main_context_iteration (NULL, TRUE);
g_assert (global_ragent_gathering_done == TRUE);
set_credentials (lagent, ls_id, ragent, rs_id);