synapse-old/tests/handlers
Erik Johnston c72d26c1e1
Refactor `EventContext` (#12689)
Refactor how the `EventContext` class works, with the intention of reducing the amount of state we fetch from the DB during event processing.

The idea here is to get rid of the cached `current_state_ids` and `prev_state_ids` that live in the `EventContext`, and instead defer straight to the database (and its caching). 

One change that may have a noticeable effect is that we now no longer prefill the `get_current_state_ids` cache on a state change. However, that query is relatively light, since its just a case of reading a table from the DB (unlike fetching state at an event which is more heavyweight). For deployments with workers this cache isn't even used.


Part of #12684
2022-05-10 19:43:13 +00:00
..
__init__.py Reference Matrix Home Server 2014-08-12 15:10:52 +01:00
oidc_test_key.p8 JWT OIDC secrets for Sign in with Apple (#9549) 2021-03-09 15:03:37 +00:00
oidc_test_key.pub.pem JWT OIDC secrets for Sign in with Apple (#9549) 2021-03-09 15:03:37 +00:00
test_admin.py Add some type hints to the tests.handlers module. (#12207) 2022-03-11 07:07:15 -05:00
test_appservice.py Bound ephemeral events by key (#12544) 2022-04-26 20:14:21 +01:00
test_auth.py Add some type hints to the tests.handlers module. (#12207) 2022-03-11 07:07:15 -05:00
test_cas.py Use `getClientAddress` instead of `getClientIP`. (#12599) 2022-05-04 14:11:21 -04:00
test_deactivate_account.py Remove redundant `get_success` calls in test code (#12346) 2022-04-01 16:10:31 +01:00
test_device.py Add some type hints to the tests.handlers module. (#12207) 2022-03-11 07:07:15 -05:00
test_directory.py Add type hints to some tests/handlers files. (#12224) 2022-03-15 09:16:37 -04:00
test_e2e_keys.py Prefer `make_awaitable` over `defer.succeed` in tests (#12505) 2022-04-27 14:58:26 +01:00
test_e2e_room_keys.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_federation.py Add type hints for `tests/unittest.py`. (#12347) 2022-04-01 16:04:16 +00:00
test_federation_event.py Refactor `EventContext` (#12689) 2022-05-10 19:43:13 +00:00
test_message.py Remove `HomeServer.get_datastore()` (#12031) 2022-02-23 11:04:02 +00:00
test_oidc.py Use `getClientAddress` instead of `getClientIP`. (#12599) 2022-05-04 14:11:21 -04:00
test_password_providers.py Remove unstable/unspecced login types. (#12597) 2022-05-04 13:53:21 +00:00
test_presence.py Prevent a sync request from removing a user's busy presence status (#12213) 2022-04-13 16:21:07 +01:00
test_profile.py Remove redundant `get_success` calls in test code (#12346) 2022-04-01 16:10:31 +01:00
test_receipts.py Use `private` instead of `hidden` in MSC2285 related code. (#12635) 2022-05-05 12:31:25 +00:00
test_register.py Remove unused `# type: ignore`s (#12531) 2022-04-27 14:03:44 +01:00
test_room.py Pull out encrypted_by_default tests from user_directory tests (#10752) 2021-09-06 11:37:54 +01:00
test_room_summary.py Support MSC3266 room summaries over federation (#11507) 2022-05-05 15:25:00 +01:00
test_saml.py Use `getClientAddress` instead of `getClientIP`. (#12599) 2022-05-04 14:11:21 -04:00
test_send_email.py Fix incompatibility with Twisted < 21. (#10713) 2021-08-27 16:33:41 +01:00
test_stats.py Remove `HomeServer.get_datastore()` (#12031) 2022-02-23 11:04:02 +00:00
test_sync.py Remove redundant `get_success` calls in test code (#12346) 2022-04-01 16:10:31 +01:00
test_typing.py Prefer `make_awaitable` over `defer.succeed` in tests (#12505) 2022-04-27 14:58:26 +01:00
test_user_directory.py Prefer `make_awaitable` over `defer.succeed` in tests (#12505) 2022-04-27 14:58:26 +01:00