synapse/tests
Eric Eastwood 2864837b65 Allow new get_sync_room_ids_for_user implementation to work with multiple event persisters
Before, the problem scenario would get caught in one of the assertions because
we expect the to_token <= membership_snapshot_token or vice-versa but it's
possible the tokens are intertwined and neither is ahead of each other.
Especially since the `instance_map` in `membership_snapshot_token` is made up
from the `stream_ordering` of membership events at various stream positions
and processed on different instances (not current stream positions).

We get into trouble when stream positions are lagging between workers and our
now/`to_token` doesn't cleanly compare to `membership_snapshot_token`.

What we really want to assert is that the `to_token` <= the stream positions
at the time we asked for the room membership snapshot. Since
`get_rooms_for_local_user_where_membership_is()` doesn't return that
information, the closest we can get is to get the stream positions before we
ask for the room membership snapshot and consider that good enough to compare
against.
2024-06-04 19:50:12 -05:00
..
api Add a short sleep if the request is rate-limited (#17210) 2024-05-18 12:03:30 +01:00
app Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
appservice Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
config Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
crypto Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
events Bring auto-accept invite logic into Synapse (#17147) 2024-05-21 20:09:17 +00:00
federation Optional whitespace support in Authorization (#1350) (#17145) 2024-05-08 13:56:16 +00:00
handlers Allow new get_sync_room_ids_for_user implementation to work with multiple event persisters 2024-06-04 19:50:12 -05:00
http Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
logging Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
media Support MSC3916 by adding unstable media endpoints to _matrix/client (#17213) 2024-05-24 09:47:37 +01:00
metrics Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
module_api Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
push Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
replication Use method to get instance name in tests 2024-06-03 16:45:08 -05:00
rest Add test for notifier.wait_for_stream_token(from_token) 2024-06-03 23:46:47 -05:00
scripts Update license headers 2023-11-21 15:29:58 -05:00
server_notices Update license headers 2023-11-21 15:29:58 -05:00
state Update license headers 2023-11-21 15:29:58 -05:00
storage Replaces all usages of StreamIdGenerator with MultiWriterIdGenerator (#17229) 2024-05-30 11:07:32 +00:00
test_utils Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
types Use immutabledict instead of frozendict (#15113) 2023-03-22 17:15:34 +00:00
util Add optimisation to StreamChangeCache (#17130) 2024-05-06 12:56:52 +01:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
server.py Bring auto-accept invite logic into Synapse (#17147) 2024-05-21 20:09:17 +00:00
test_distributor.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_event_auth.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_federation.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_mau.py Update license headers 2023-11-21 15:29:58 -05:00
test_phone_home.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_rust.py Add missing type hints to tests. (#15027) 2023-02-08 19:52:37 +00:00
test_server.py Update license headers 2023-11-21 15:29:58 -05:00
test_state.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_terms_auth.py Update license headers 2023-11-21 15:29:58 -05:00
test_test_utils.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_types.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_visibility.py Add support for MSC4115 (#17104) 2024-04-29 15:22:13 +01:00
unittest.py Add a short sleep if the request is rate-limited (#17210) 2024-05-18 12:03:30 +01:00
utils.py Improve lock performance when a lot of locks are waiting (#16840) 2024-03-14 13:49:54 +00:00