GNOME Bugzilla – Bug 728501
rtpaux/rtprtx: Unit tests are racy and take very long sometimes
Last modified: 2014-06-03 22:00:03 UTC
rtpaux unit test currently run g_main_loop_run() twice right after another, probably to catch to EOS messages. This should instead just count and run a single loop. Independent from that both tests are sometimes very fast, sometimes taking ages... and especially in valgrind can take many many minutes. This should definitely be improved somehow.
These should fix it! They're still horribly slow, but at least, much less racy. commit 985897d8d95b13065ba19cb01aae105d2423feb2 Author: Olivier Crête <olivier.crete@ocrete.ca> Date: Sun May 4 20:23:29 2014 -0400 rtpaux/rtprtx: Make tests non-racy Fix the raciness by iterating on a condition instead of using the gmainloop. Don't use the EOS as the target, otherwise the retransmission of the last packets are lost. Also count the retranmissions requests that are dropped. Check the condition before blocking on the GCond https://bugzilla.gnome.org/show_bug.cgi?id=728501 commit b2a52035bf8a33c2b334a70e7a853e2a991248ae Author: Olivier Crête <olivier.crete@ocrete.ca> Date: Sun May 4 22:32:54 2014 -0400 rtprtxreceive: Wait until timeout to clear association requests If two streams request a retranmission for the same SSRC, ignore the second one if the first oen is less than one second old, otherwise time out the first one and ignore the second.
Actually, test_drop_one_sender in the rtprtx test is still racy.
Olivier, Busy at 11 pm on a Sunday night. Respect.
Fixed for real now. commit 4377dfeaddce94e97a5037f2dd97344fb947cc00 Author: Olivier Crête <olivier.crete@collabora.com> Date: Tue Jun 3 17:59:32 2014 -0400 rtprtx: Reset state on each iteration Otherwise it didn't wait for the test to finish before checking the results. https://bugzilla.gnome.org/show_bug.cgi?id=728501