synapse/tests/http
Eric Eastwood 5adb08f3c9
Remove MockClock() (#18992)
Spawning from adding some logcontext debug logs in
https://github.com/element-hq/synapse/pull/18966 and since we're not
logging at the `set_current_context(...)` level (see reasoning there),
this removes some usage of `set_current_context(...)`.

Specifically, `MockClock.call_later(...)` doesn't handle logcontexts
correctly. It uses the calling logcontext as the callback context
(wrong, as the logcontext could finish before the callback finishes) and
it didn't reset back to the sentinel context before handing back to the
reactor. It was like this since it was [introduced 10+ years
ago](38da9884e7).
Instead of fixing the implementation which would just be a copy of our
normal `Clock`, we can just remove `MockClock`
2025-09-30 11:27:29 -05:00
..
federation Remove MockClock() (#18992) 2025-09-30 11:27:29 -05:00
server Fix server_name in logging context for multiple Synapse instances in one process (#18868) 2025-09-26 17:10:48 -05:00
__init__.py Update license headers 2023-11-21 15:29:58 -05:00
ca.crt Tests for SSL certs for federation connections 2019-06-10 16:14:20 +01:00
ca.key Tests for SSL certs for federation connections 2019-06-10 16:14:20 +01:00
server.key Tests for SSL certs for federation connections 2019-06-10 16:14:20 +01:00
test_additional_resource.py Update license headers 2023-11-21 15:29:58 -05:00
test_client.py Use twisted.internet.testing module in tests instead of deprecated twisted.test.proto_helpers. (#18728) 2025-07-30 12:32:10 +01:00
test_endpoint.py Update license headers 2023-11-21 15:29:58 -05:00
test_matrixfederationclient.py Remove MockClock() (#18992) 2025-09-30 11:27:29 -05:00
test_proxy.py Remove usage of internal header encoding API (#17894) 2024-11-04 12:20:07 -06:00
test_proxyagent.py Configure HTTP proxy in file config (#18686) 2025-07-22 10:33:00 -05:00
test_servlet.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
test_simple_client.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_site.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00