Skip to content

test: make three timing-dependent tests deterministic - #525

Merged
devopvoid merged 3 commits into
mainfrom
test/deterministic-ci-tests
Nov 3, 2026
Merged

devopvoid merged 3 commits into
mainfrom
test/deterministic-ci-tests

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

Three tests that failed now and then on CI runners, independent of recent changes:

  • SinkRegistryTests: the deferred sink changes are held until the test has checked that they were not made yet.
  • RuntimeCloseTests.closeTimeoutReported: the runtime close ends only after close() has timed out; both waited 100 ms.
  • MediaTests.slowFrameHandlerGetsNewest: the handler blocks until the decoder got ahead, instead of relying on more than about five frames a second.

The thread making the native calls deferred from a callback could make them
before the test checked that they had not been made yet.
Both waits took 100 ms: a close() that woke up late found closing ended
and reported no timeout.
A handler sleeping 200 ms per frame fell behind only where the encoder
sent more than about five frames a second, which slow runners did not.
@devopvoid
devopvoid merged commit 58c7831 into main Nov 3, 2026
22 checks passed
@devopvoid
devopvoid deleted the test/deterministic-ci-tests branch November 3, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant