This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add ResponseCache tests #9458
Add ResponseCache tests #9458
Changes from 6 commits
95e9399
aee352a
f4549e3
4140f74
86e0e06
b8edfef
e85409e
ecac6ad
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you want to use
tests.server.get_clock
here (and it would be nice to name them the same asreactor
andclock
(to matchHomeserverTestCase
).It might even make sense to create the cache object here and then use it for each test (this simplifies each individual test-case, which makes it easier to see what each test-case is testing). I know the timeouts are currently different on them, but I think the tests could be slightly modified to take that into account.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll use
get_clock
and rename toclock
👍, but i wont move the cache here, as they need to be variable for tests (see the naming andtimeout_ms
on each.One thing I will do is make it a separate function (with accepts a name and optionally
ms=
), so that future tests can just use that instead of instantiating it directly every time.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the instantiation to
with_cache
to make it easier on the eyes, please notify if this is wrong.