tests-clock: Fix race in test_late_crank
authorThibault Saunier <tsaunier@igalia.com>
Fri, 20 Dec 2019 13:53:21 +0000 (10:53 -0300)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 20 Dec 2019 15:51:45 +0000 (15:51 +0000)
commit767e0e46e9fb600dcdcb39b79b819fd5cea86b2c
treef1e619e720dace61843b4dd5399a603b5480255e
parent0cb3940c94b06993060da358367a702e5ac6f8ad
tests-clock: Fix race in test_late_crank

There was a case where we started waiting on the clock before setting
the clock time, leading to the wait succeeding instead of being late:

    gsttestclock.c:1073:F:testclock:test_late_crank:0: '1 * GST_SECOND' (1000000000) is not equal to 'context.jitter' (-4000000000)

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/426

Co-authored by: Mathieu Duponchelle <mathieu@centricular.com>
tests/check/libs/gsttestclock.c