Commit 28900036 authored by François Grisez's avatar François Grisez
Browse files

Fix random failure of 'Flexisip/DoS module trigger by sending a lot of chat messages' test

(cherry picked from commit b8f35cbb)
parent 3a9141c6
......@@ -1076,6 +1076,13 @@ static void dos_module_trigger(void) {
BC_ASSERT_LOWER_STRICT(marie->stat.number_of_LinphoneMessageReceived, message_sent_index - message_rate, int, "%d");
wait_for_until(marie->lc, pauline->lc, &dummy, 1, 65000); // Wait several seconds to ensure we are not banned anymore
/*
We need to wait that all messages are received here to have the TCP session ready to send data. Indeed, as the
destination was unreachable for a time, all not-sent messages have been queued locally waiting for retransmission.
No data can be send until all retransmissions succeeds.
*/
BC_ASSERT(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneMessageReceived, message_sent_index));
reset_counters(&marie->stat);
reset_counters(&pauline->stat);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment