synapse/tests/config
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
..
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test___main__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_api.py Fix a couple type annotations in the RootConfig/Config (#18409) 2025-05-13 10:22:15 -05:00
test_appservice.py Fix a couple type annotations in the RootConfig/Config (#18409) 2025-05-13 10:22:15 -05:00
test_background_update.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_base.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_cache.py Fix server_name in logging context for multiple Synapse instances in one process (#18868) 2025-09-26 17:10:48 -05:00
test_database.py Fix a couple type annotations in the RootConfig/Config (#18409) 2025-05-13 10:22:15 -05:00
test_generate.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_load.py Add recaptcha_{private,public}_key_path config option (#17984) 2025-07-14 11:37:36 -05:00
test_oauth_delegation.py Remove MockClock() (#18992) 2025-09-30 11:27:29 -05:00
test_ratelimiting.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_registration_config.py Split loading config vs homeserver setup (#18933) 2025-09-22 14:53:02 -05:00
test_room_directory.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_server.py Fix a couple type annotations in the RootConfig/Config (#18409) 2025-05-13 10:22:15 -05:00
test_tls.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_util.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_workers.py Add --no-secrets-in-config command line option (#18092) 2025-02-25 16:26:01 +00:00
utils.py Add macaroon_secret_key_path config option (#17983) 2024-12-16 18:01:33 -06:00