synapse/tests
Eric Eastwood 0417296b9f
Remove logcontext problems caused by awaiting raw deferLater(...) (#19058)
This is a normal
problem where we `await` a deferred without wrapping it in
`make_deferred_yieldable(...)`. But I've opted to replace the usage of
`deferLater` with something more standard for the Synapse codebase.

Part of https://github.com/element-hq/synapse/issues/18905

It's unclear why we're only now seeing these failures happen with the
changes from https://github.com/element-hq/synapse/pull/19057

Example failures seen in
https://github.com/element-hq/synapse/actions/runs/18477454390/job/52645183606?pr=19057

```
builtins.AssertionError: Expected `looping_call` callback from the reactor to start with the sentinel logcontext but saw task-_resumable_task-0-IBzAmHUoepQfLnEA. In other words, another task shouldn't have leaked their logcontext to us.
```
2025-10-29 10:23:10 -05:00
..
api Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
app Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
appservice Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
config Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
crypto Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
events Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
federation Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
handlers Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
http Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
logging Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
media Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
metrics Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
module_api Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
push Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
replication Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
rest Remove logcontext problems caused by awaiting raw deferLater(...) (#19058) 2025-10-29 10:23:10 -05:00
scripts Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
server_notices Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
state Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
storage Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
synapse_rust Wrap the Rust HTTP client with make_deferred_yieldable (#18903) 2025-10-02 13:00:50 -05:00
test_utils Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
types Support for room version 12 2025-08-11 16:43:45 +01:00
util Remove logcontext problems caused by awaiting raw deferLater(...) (#19058) 2025-10-29 10:23:10 -05:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
server.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_distributor.py Cleanly shutdown SynapseHomeServer object (#18828) 2025-10-01 02:42:09 +00:00
test_event_auth.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_mau.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_phone_home.py Move unique snowflake homeserver background tasks to start_background_tasks (#19037) 2025-10-13 10:19:09 -05:00
test_rust.py Add missing type hints to tests. (#15027) 2023-02-08 19:52:37 +00:00
test_server.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_state.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -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_types.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05: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 Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
utils.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00