tests/webrtc: fix a race in the tests related to state tracking
authorMatthew Waters <matthew@centricular.com>
Fri, 26 Nov 2021 10:51:57 +0000 (21:51 +1100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 29 Mar 2022 23:55:40 +0000 (23:55 +0000)
commitf11e0e76c6bbbe8dd24983c57766dfcda57928b3
tree55ee8eb739bc796358df513385ca442d5d3faae0
parent5257093268f6eb1055f0104df17f45c43eaddf25
tests/webrtc: fix a race in the tests related to state tracking

If things progress fast enough, some state changes may not be seen be
the waiting code.

Fix by:
1. keeping a list of all the state changes
2. waiting checks each entry and if the relevant state is found, all
   states up to and including then are removed.

This ensures that any waits will see all the state sets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1664>
subprojects/gst-plugins-bad/tests/check/elements/webrtcbin.c