synapse/tests/rest/admin
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
..
__init__.py Update license headers 2023-11-21 15:29:58 -05:00
test_admin.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_background_updates.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_device.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_event_reports.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_event.py Add an Admin API to fetch an event by ID (#18963) 2025-10-08 11:38:15 +01:00
test_federation.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_jwks.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_media.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_registration_tokens.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_room.py Remove logcontext problems caused by awaiting raw deferLater(...) (#19058) 2025-10-29 10:23:10 -05:00
test_scheduled_tasks.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_server_notice.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_statistics.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_user.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_username_available.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00