synapse/tests
Andrew Morgan 21bd230831
Add a test for update_presence (#10033)
https://github.com/matrix-org/synapse/issues/9962 uncovered that we accidentally removed all but one of the presence updates that we store in the database when persisting multiple updates. This could cause users' presence state to be stale.

The bug was fixed in #10014, and this PR just adds a test that failed on the old code, and was used to initially verify the bug.

The test attempts to insert some presence into the database in a batch using `PresenceStore.update_presence`, and then simply pulls it out again.
2021-05-21 17:29:14 +01:00
..
api Correctly ratelimit invites when creating a room (#9968) 2021-05-12 16:05:28 +02:00
app Split presence out of master (#9820) 2021-04-23 12:21:55 +01:00
appservice Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
config Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
crypto Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
events Use a database table to hold the users that should have full presence sent to them, instead of something in-memory (#9823) 2021-05-18 14:13:45 +01:00
federation Merge pull request from GHSA-x345-32rc-8h85 2021-05-11 11:47:23 +02:00
handlers Add a test for update_presence (#10033) 2021-05-21 17:29:14 +01:00
http Improved validation for received requests (#9817) 2021-04-23 19:20:44 +01:00
logging Merge branch 'master' into develop 2021-04-20 14:55:16 +01:00
module_api Use a database table to hold the users that should have full presence sent to them, instead of something in-memory (#9823) 2021-05-18 14:13:45 +01:00
push Merge pull request from GHSA-x345-32rc-8h85 2021-05-11 11:47:23 +02:00
replication Use a database table to hold the users that should have full presence sent to them, instead of something in-memory (#9823) 2021-05-18 14:13:45 +01:00
rest Correctly ratelimit invites when creating a room (#9968) 2021-05-12 16:05:28 +02:00
scripts Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
server_notices Revert "Leave out optional keys from /sync (#9919)" (#9940) 2021-05-06 15:06:35 +01:00
state Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
storage Reorganise the database schema directories (#9932) 2021-05-07 10:22:05 +01:00
test_utils Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
util Add a batching queue implementation. (#10017) 2021-05-21 11:20:51 +01:00
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
server.py Kill off _PushHTTPChannel. (#9878) 2021-04-23 18:40:57 +01:00
test_distributor.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_event_auth.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_federation.py Merge branch 'master' into develop 2021-04-20 14:55:16 +01:00
test_mau.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_metrics.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_phone_home.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_preview.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_server.py Improved validation for received requests (#9817) 2021-04-23 19:20:44 +01:00
test_state.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_terms_auth.py Use mock from the stdlib. (#9772) 2021-04-09 13:44:38 -04:00
test_test_utils.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_types.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_visibility.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
unittest.py Remove various bits of compatibility code for Python <3.6 (#9879) 2021-04-27 13:13:07 +01:00
utils.py Remove room and user invite ratelimits in default unit test config (#9871) 2021-04-23 13:37:48 +01:00