summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2016-03-01 23:04:14 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2016-03-01 23:04:21 +0000
commit47eaf50a99d91c4a666f05c4de24613706847c88 (patch)
tree995d025de2ea10d400e4293540b4ca3262611dfa /tests
parent4e68244a51698aefdf44dd1ceb17b95275e655bf (diff)
downloadlibnice-47eaf50a99d91c4a666f05c4de24613706847c88.tar.gz
test-new-dribble: wait until ragent reaches state completed
The test didn't let enough time for ragent to reach the completed state after obtaining its remote candidates and switching to connecting state. Reviewed-by: Olivier CrĂȘte <olivier.crete@collabora.com> Differential Revision: https://phabricator.freedesktop.org/D817
Diffstat (limited to 'tests')
-rw-r--r--tests/test-new-dribble.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test-new-dribble.c b/tests/test-new-dribble.c
index 22064e5..3e60ae3 100644
--- a/tests/test-new-dribble.c
+++ b/tests/test-new-dribble.c
@@ -523,6 +523,10 @@ static void standard_test(NiceAgent *lagent, NiceAgent *ragent)
g_assert (lagent_candidate_gathering_done);
+ while (global_ragent_state < NICE_COMPONENT_STATE_CONNECTED)
+ g_main_context_iteration (NULL, TRUE);
+ g_cancellable_reset (global_cancellable);
+
g_assert (global_lagent_state == NICE_COMPONENT_STATE_READY);
g_assert (global_ragent_state >= NICE_COMPONENT_STATE_CONNECTED);