-
Notifications
You must be signed in to change notification settings - Fork 731
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
Refactoring for safer olm and megolm session usage #5380
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
10ea166
Extract olm cache store
BillCarsonFr 33f9bc5
Protect olm session from concurrent access
BillCarsonFr 9df5f17
protect olm account access
BillCarsonFr 87d9308
Fix test compilation
BillCarsonFr 24c51ea
Clean megolm import code
BillCarsonFr c97de48
Added e2ee sanity tests
BillCarsonFr 9b3c5d2
Improve inbound group session cache + mutex
BillCarsonFr ade16a0
protect race on prekey + logs
BillCarsonFr 9eb0473
better logs
BillCarsonFr 11e8881
test forward better key
BillCarsonFr 2f665dd
cleaning
BillCarsonFr 122e785
clean test
BillCarsonFr 2d9beb6
extract test to dedicated class
BillCarsonFr f238739
Clean ensure olm, fix unwedging, better logs
BillCarsonFr 078ed1b
dispatch network calls to io
BillCarsonFr b7bf39b
resurrect unwedge test + cleaning
BillCarsonFr 87de51b
Use loggerTag
BillCarsonFr 49d33f3
avoid duplicate userId on key download
BillCarsonFr 6546f98
use mutex on suspend and not synchronized
BillCarsonFr 714e1d7
clean log level
BillCarsonFr ada83d0
fix test
BillCarsonFr 5d952fe
code review cleaning
BillCarsonFr 7616e2d
better comment
BillCarsonFr 31d3fe3
Better comment
BillCarsonFr 99a07af
Better comment
BillCarsonFr db84c67
Code review cleaning
BillCarsonFr 3c931d6
Save valid backup key before downloading keys
BillCarsonFr 96b5174
Fix ktlint
BillCarsonFr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
648 changes: 648 additions & 0 deletions
648
...dk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/E2eeSanityTests.kt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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 found myself doing this in response to slow integration tests in #5459 - do you have any more information on why 60s is better?
(we changed 30s -> 60s here, but the github is not showing me both sides of the diff atm)
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.
When doing test with several sessions everything is getting a lot slower (like E2E sanity test), each session is slower to sync, etc...
Everytime we test something with await/waitWithLatch it's using that as default timeout, and test are then failing when waiting from something coming back from the sync.
It also happens when running all tests, I wonder if we don't clean properly between test?
Previously I used the
ANDROIDX_TEST_ORCHESTRATOR
option to ensure that all test start with a clear state, but looks like it's not working anymore.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.
We definitely don't clean up the server between tests in a single junit run, but will clean up between CI builds generally (and if you just run a demo server locally, then that won't be cleaned up unless you explicitly do so)