synapse/tests
Eric Eastwood 2f2b854ac1
Fix logcontext handling in timeout_deferred tests (#18974)
Related to https://github.com/element-hq/synapse/issues/18905

These fixes were split off from
https://github.com/element-hq/synapse/pull/18828 where @devonh was
seeing some test failures because `timeout_deferred(...)` is being
updated to use `Clock` utilities instead of raw `reactor` methods. This
test was failing in that branch/PR until we made this new version that
handles the logcontexts properly.

While the previous version of this test does pass on `develop`, it was
using what appears completely wrong assertions, assumptions, and bad
patterns to make it happen (see diff comments below)

---

Test originally introduced in https://github.com/matrix-org/synapse/pull/4407
2025-09-26 11:10:02 -05:00
..
api Update MSC4326 error code (#18947) 2025-09-24 11:57:24 +01:00
app Split loading config vs homeserver setup (#18933) 2025-09-22 14:53:02 -05:00
appservice Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
config Split loading config vs homeserver setup (#18933) 2025-09-22 14:53:02 -05:00
crypto Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
events Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
federation Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
handlers Use signature support from policy servers when available (#18934) 2025-09-25 19:30:24 +00:00
http Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
logging Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
media Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
metrics Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
module_api Document and fix room_config param when user_may_create_room callback is invoked for a room upgrade (#18721) 2025-09-24 21:42:19 +00:00
push Remove sentinel logcontext in Clock utilities (looping_call, looping_call_now, call_later) (#18907) 2025-09-22 14:51:13 -05:00
replication Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
rest Add an Admin API to query a piece of local or cached remote media by ID (#18911) 2025-09-23 16:25:56 -05:00
scripts Update license headers 2023-11-21 15:29:58 -05:00
server_notices Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
state Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
storage Fix performance regression related to delayed events processing (#18926) 2025-09-23 09:47:30 +01:00
test_utils Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
types Support for room version 12 2025-08-11 16:43:45 +01:00
util Fix logcontext handling in timeout_deferred tests (#18974) 2025-09-26 11:10:02 -05:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
server.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_distributor.py Refactor background process metrics to be homeserver-scoped (#18670) 2025-07-23 13:28:17 -05:00
test_event_auth.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
test_mau.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_phone_home.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_rust.py Add missing type hints to tests. (#15027) 2023-02-08 19:52:37 +00:00
test_server.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_state.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_terms_auth.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_test_utils.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_types.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
test_visibility.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
unittest.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
utils.py Refactor Histogram metrics to be homeserver-scoped (#18724) 2025-07-29 15:35:38 -05:00