diff options
author | Erik Johnston <erik@matrix.org> | 2023-03-29 12:07:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-29 12:07:14 +0100 |
commit | 78cdb72cd6b0e007c314d9fed9f629dfc5b937a6 (patch) | |
tree | d62e56a47d56a3f575eb3aa87e49202ae133873a /tests/storage | |
parent | doc: fix account login requests ratelimit defaults typo (#15341) (diff) | |
download | synapse-78cdb72cd6b0e007c314d9fed9f629dfc5b937a6.tar.xz |
Delete stale non-e2e devices for users, take 3 (#15183)
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.
Diffstat (limited to 'tests/storage')
-rw-r--r-- | tests/storage/test_client_ips.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/storage/test_client_ips.py b/tests/storage/test_client_ips.py index cd0079871c..f989986538 100644 --- a/tests/storage/test_client_ips.py +++ b/tests/storage/test_client_ips.py @@ -170,6 +170,8 @@ class ClientIpStoreTestCase(unittest.HomeserverTestCase): ) ) + last_seen = self.clock.time_msec() + if after_persisting: # Trigger the storage loop self.reactor.advance(10) @@ -190,7 +192,7 @@ class ClientIpStoreTestCase(unittest.HomeserverTestCase): "device_id": device_id, "ip": None, "user_agent": None, - "last_seen": None, + "last_seen": last_seen, }, ], ) |