check: Avoid race with leaks test

The problem is that the taskpool might not have completely drained by the time
we check for leaks.

Instead, ensure all tasks have stopped before testing for valid results.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/523>
This commit is contained in:
Edward Hervey 2020-06-07 18:42:21 +02:00 committed by Edward Hervey
parent 3ac3a01298
commit 58859c8ee9

View file

@ -169,6 +169,9 @@ GST_START_TEST (test_get_live_objects)
GST_STATE_CHANGE_SUCCESS);
gst_object_unref (pipe);
/* Force all leftover tasks to stop */
gst_task_cleanup_all ();
/* Check the live-objects data returned by the tracer */
{
guint ii, size;
@ -251,6 +254,9 @@ GST_START_TEST (test_get_live_objects_filtered_detailed)
GST_STATE_CHANGE_SUCCESS);
gst_object_unref (pipe);
/* Force all leftover tasks to stop */
gst_task_cleanup_all ();
/* Check the live-objects data returned by the tracer */
{
guint ii, jj, isize, jsize;
@ -432,6 +438,9 @@ GST_START_TEST (test_activity_get_checkpoint)
GST_STATE_CHANGE_SUCCESS);
gst_object_unref (pipe);
/* Force all leftover tasks to stop */
gst_task_cleanup_all ();
{
GstStructure *cpoint;
const GstStructure *cs, *rs;