Skip to content

Remove wall-clock dependency of test_redact_messages_all_rooms test.#19890

Merged
reivilibre merged 2 commits into
developfrom
rei/ci_trial_no10swall
Jul 1, 2026
Merged

Remove wall-clock dependency of test_redact_messages_all_rooms test.#19890
reivilibre merged 2 commits into
developfrom
rei/ci_trial_no10swall

Conversation

@reivilibre

Copy link
Copy Markdown
Contributor

Introduced in: #17847

This 10-second wall-clock timeout was troublesome as it fails on slow/struggling CI runners, like the
default ones for private GitHub repositories.

The loop also silently relied on the reactor advance in make_request,
whereas we could just deterministically advance the reactor the known amount of times
instead.

Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
@reivilibre reivilibre marked this pull request as ready for review June 29, 2026 18:29
@reivilibre reivilibre requested a review from a team as a code owner June 29, 2026 18:29
@reivilibre reivilibre changed the title Remove wall-clock dependency of test_redact_messages_all_rooms test, as this caused flakiness. Remove wall-clock dependency of test_redact_messages_all_rooms test. Jul 1, 2026
@reivilibre reivilibre merged commit acb0ae1 into develop Jul 1, 2026
40 checks passed
@reivilibre reivilibre deleted the rei/ci_trial_no10swall branch July 1, 2026 16:12
Comment on lines +5790 to +5791
# Need 1 tick as we send 1 replication request per original event
# and each wait must be >= `_EPSILON` from `http/client.py`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm updating this description further in #19871 as I'm also making other related changes. Thanks for making this more precise!

Suggested change
# Need 1 tick as we send 1 replication request per original event
# and each wait must be >= `_EPSILON` from `http/client.py`
# `/redact` just schedules a background task that runs in the background
# (fire-and-forget) so we need to do the waiting here.
#
# Need 1 tick as we send 1 replication request for the redaction of each
# original event. The replication request body is streamed by a `Cooperator`
# that uses the clock to schedule each chunk at a tiny *non-zero* delay
# (`CLOCK_SCHEDULE_EPSILON`), so we need to actually advance the clock for it to
# fire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants