summary refs log tree commit diff
path: root/tests/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-11-29 10:36:41 +0000
committerGitHub <noreply@github.com>2022-11-29 10:36:41 +0000
commitc7e29ca277cf60bfdc488b93f4321b046fa6b46f (patch)
treef9d75dbe799ec850750b3206bc3dd001220799e3 /tests/storage
parentFix possible variable shadow in `create_new_client_event` (#14575) (diff)
downloadsynapse-c7e29ca277cf60bfdc488b93f4321b046fa6b46f.tar.xz
POC delete stale non-e2e devices for users (#14038)
This should help reduce the number of devices e.g. simple bots the repeatedly login rack up.

We only delete non-e2e devices as they should be safe to delete, whereas if we delete e2e devices for a user we may accidentally break their ability to receive e2e keys for a message.

Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
Diffstat (limited to 'tests/storage')
-rw-r--r--tests/storage/test_client_ips.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/storage/test_client_ips.py b/tests/storage/test_client_ips.py

index 49ad3c1324..a9af1babed 100644 --- a/tests/storage/test_client_ips.py +++ b/tests/storage/test_client_ips.py
@@ -169,6 +169,8 @@ class ClientIpStoreTestCase(unittest.HomeserverTestCase): ) ) + last_seen = self.clock.time_msec() + if after_persisting: # Trigger the storage loop self.reactor.advance(10) @@ -189,7 +191,7 @@ class ClientIpStoreTestCase(unittest.HomeserverTestCase): "device_id": device_id, "ip": None, "user_agent": None, - "last_seen": None, + "last_seen": last_seen, }, ], )