synapse/tests/rest/client/sliding_sync
Erik Johnston b74c29f694
Move towards a dedicated Duration class (#19223)
We have various constants to try and avoid mistyping of durations, e.g.
`ONE_HOUR_SECONDS * MILLISECONDS_PER_SECOND`, however this can get a
little verbose and doesn't help with typing.

Instead, let's move towards a dedicated `Duration` class (basically a
[`timedelta`](https://docs.python.org/3/library/datetime.html#timedelta-objects)
with helper methods).

This PR introduces the new types and converts all usages of the existing
constants with it. Future PRs may work to move the clock methods to also
use it (e.g. `call_later` and `looping_call`).

Reviewable commit-by-commit.
2025-11-26 10:56:59 +00:00
..
__init__.py Sliding Sync: Split and move tests (#17504) 2024-07-31 12:20:46 -05:00
test_connection_tracking.py Move towards a dedicated Duration class (#19223) 2025-11-26 10:56:59 +00:00
test_extension_account_data.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_extension_e2ee.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_extension_receipts.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_extension_thread_subscriptions.py Write union types as X | Y where possible (#19111) 2025-11-06 14:02:33 -06:00
test_extension_to_device.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_extension_typing.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_extensions.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_lists_filters.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_room_subscriptions.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_rooms_invites.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_rooms_meta.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_rooms_required_state.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_rooms_timeline.py Write union types as X | Y where possible (#19111) 2025-11-06 14:02:33 -06:00
test_sliding_sync.py Expire sliding sync connections (#19211) 2025-11-25 10:20:47 +00:00