anonymousland-synapse/tests/rest/client
David Robertson 80d44060c9
Faster joins: omit partial rooms from eager syncs until the resync completes (#14870)
* Allow `AbstractSet` in `StrCollection`

Or else frozensets are excluded. This will be useful in an upcoming
commit where I plan to change a function that accepts `List[str]` to
accept `StrCollection` instead.

* `rooms_to_exclude` -> `rooms_to_exclude_globally`

I am about to make use of this exclusion mechanism to exclude rooms for
a specific user and a specific sync. This rename helps to clarify the
distinction between the global config and the rooms to exclude for a
specific sync.

* Better function names for internal sync methods

* Track a list of excluded rooms on SyncResultBuilder

I plan to feed a list of partially stated rooms for this sync to ignore

* Exclude partial state rooms during eager sync

using the mechanism established in the previous commit

* Track un-partial-state stream in sync tokens

So that we can work out which rooms have become fully-stated during a
given sync period.

* Fix mutation of `@cached` return value

This was fouling up a complement test added alongside this PR.
Excluding a room would mean the set of forgotten rooms in the cache
would be extended. This means that room could be erroneously considered
forgotten in the future.

Introduced in #12310, Synapse 1.57.0. I don't think this had any
user-visible side effects (until now).

* SyncResultBuilder: track rooms to force as newly joined

Similar plan as before. We've omitted rooms from certain sync responses;
now we establish the mechanism to reintroduce them into future syncs.

* Read new field, to present rooms as newly joined

* Force un-partial-stated rooms to be newly-joined

for eager incremental syncs only, provided they're still fully stated

* Notify user stream listeners to wake up long polling syncs

* Changelog

* Typo fix

Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>

* Unnecessary list cast

Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>

* Rephrase comment

Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>

* Another comment

Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>

* Fixup merge(?)

* Poke notifier when receiving un-partial-stated msg over replication

* Fixup merge whoops

Thanks MV :)

Co-authored-by: Mathieu Velen <mathieuv@matrix.org>

Co-authored-by: Mathieu Velten <mathieuv@matrix.org>
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
2023-01-23 15:44:39 +00:00
..
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_account_data.py Add a module callback to react to account data changes (#12327) 2022-04-01 11:22:48 +02:00
test_account.py Disable sending confirmation email when 3pid is disabled #14682 (#14725) 2023-01-09 11:12:03 +00:00
test_auth.py Fix /refresh endpoint version (#14364) 2022-11-04 16:43:51 +00:00
test_capabilities.py Add type hints to tests/rest/client (#12066) 2022-02-23 08:33:19 -05:00
test_consent.py Add type hints to tests/rest/client (#12072) 2022-02-24 13:56:38 -05:00
test_devices.py Fix dehydrated device REST checks (#14336) 2022-10-31 20:31:43 +00:00
test_directory.py Remove unnecessary json.dumps from tests (#13303) 2022-07-17 22:28:45 +01:00
test_ephemeral_message.py Add type hints to tests/rest/client (#12072) 2022-02-24 13:56:38 -05:00
test_events.py Additional constants for EDU types. (#12884) 2022-05-27 07:14:36 -04:00
test_filter.py Use literals in place of HTTPStatus constants in tests (#13463) 2022-08-05 16:59:09 +02:00
test_identity.py Drop support for calling /_matrix/client/v3/rooms/{roomId}/invite without an id_access_token (#13241) 2022-08-31 12:10:25 +00:00
test_keys.py Cancel the processing of key query requests when they time out. (#13680) 2022-09-07 12:03:32 +01:00
test_login_token_request.py Respond with proper error responses on unknown paths. (#14621) 2022-12-08 11:37:05 -05:00
test_login.py Refactor OIDC tests to better mimic an actual OIDC provider. (#13910) 2022-10-25 14:25:02 +00:00
test_models.py A third batch of Pydantic validation for rest/client/account.py (#13736) 2022-09-15 18:36:02 +01:00
test_mutual_rooms.py Mutual rooms: Remove dependency on user directory (#12836) 2022-05-30 10:05:31 +01:00
test_notifications.py Fix invite notifications for users without pushers (#12840) 2022-05-30 13:14:43 +02:00
test_password_policy.py Remove unnecessary json.dumps from tests (#13303) 2022-07-17 22:28:45 +01:00
test_power_levels.py Add type hints to tests/rest/client (#12072) 2022-02-24 13:56:38 -05:00
test_presence.py Prefer make_awaitable over defer.succeed in tests (#12505) 2022-04-27 14:58:26 +01:00
test_profile.py annotate tests.server.FakeChannel (#13136) 2022-07-04 18:08:56 +01:00
test_push_rule_attrs.py Add type hints to tests/rest/client (#12084) 2022-02-28 17:47:37 +00:00
test_receipts.py Reject receipt requests with invalid room or event IDs. (#14632) 2022-12-07 17:35:41 +00:00
test_redactions.py Implement MSC3912: Relation-based redactions (#14260) 2022-11-03 16:21:31 +00:00
test_register.py Allow admins to require a manual approval process before new accounts can be used (using MSC3866) (#13556) 2022-09-29 15:23:24 +02:00
test_relations.py Implement MSC3925: changes to bundling of edits (#14811) 2023-01-10 16:31:28 +00:00
test_rendezvous.py Respond with proper error responses on unknown paths. (#14621) 2022-12-08 11:37:05 -05:00
test_report_event.py Use literals in place of HTTPStatus constants in tests (#13463) 2022-08-05 16:59:09 +02:00
test_retention.py synapse.api.auth.Auth cleanup: make permission-related methods use Requester instead of the UserID (#13024) 2022-08-22 14:17:59 +01:00
test_room_batch.py Remove remaining bits of groups code. (#12936) 2022-06-01 09:41:25 -04:00
test_rooms.py Faster joins: omit partial rooms from eager syncs until the resync completes (#14870) 2023-01-23 15:44:39 +00:00
test_sendtodevice.py Additional constants for EDU types. (#12884) 2022-05-27 07:14:36 -04:00
test_shadow_banned.py Drop support for calling /_matrix/client/v3/rooms/{roomId}/invite without an id_access_token (#13241) 2022-08-31 12:10:25 +00:00
test_sync.py Faster joins: omit partial rooms from eager syncs until the resync completes (#14870) 2023-01-23 15:44:39 +00:00
test_third_party_rules.py Use literals in place of HTTPStatus constants in tests (#13463) 2022-08-05 16:59:09 +02:00
test_transactions.py Prefer make_awaitable over defer.succeed in tests (#12505) 2022-04-27 14:58:26 +01:00
test_typing.py Do not allow a None-limit on PaginationConfig. (#14146) 2022-10-14 12:30:05 +00:00
test_upgrade_room.py Change default room version to 10. Implements MSC3904 (#14111) 2023-01-18 18:59:48 +00:00
utils.py Implement MSC3912: Relation-based redactions (#14260) 2022-11-03 16:21:31 +00:00