Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[E2E] Various improvements #265

Closed
wants to merge 56 commits into from
Closed

[E2E] Various improvements #265

wants to merge 56 commits into from

Conversation

Zil0
Copy link
Contributor

@Zil0 Zil0 commented Aug 6, 2018

Smallish PR adding general improvements (no new functionality).

Signed-off-by: Valentin Deniaud <valentin.deniaud@inpt.fr>

@Zil0 Zil0 force-pushed the fixups branch 3 times, most recently from 5c3fed1 to 4ff57d4 Compare August 10, 2018 14:52
Use a thread to allow downloading the keys in a non-blocking way.
Implement sort of a queue of users who need updating, which should be
efficient (request is fired as soon as possible with as much data as
possible) and avoid races (we always have only one download in
progress).
This has the effect of tracking the device lists of users proactively.
Since device tracking is done in a separate thread, we need to be
careful not to use the same connection object between threads (in
fact the problem existed since the first persistence commit when using
MatrixClient.start_listener_thread).
Nicer sqlite practices and better docstrings.
A side-effect is that this removes the ability to store E2E data
for different devices of the same user in the DB. It shouldn't
be much of a problem as it is easy to use multiple DB files
for different instances of MatrixClient.

Signed-off-by: Valentin Deniaud <valentin.deniaud@inpt.fr>
Make those tests more maintanable by getting rid of unwanted side
effects and useless cleanups by using pytest.fixture, along with some
readability improvements.
Encryption shouldn't be supported on limited cache_level. Even if it may
work a bit, it causes a lot of data to be cached.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants