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

Rework enableEncryption test to be less timing dependent #801

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

nvrWhere
Copy link
Collaborator

@nvrWhere nvrWhere commented Sep 15, 2024

So after failing the enableEncryption test in #800 I had a deeper look at the test. What was happening was that we were creating a room but were not waiting for the room state to be synced down. This meant that when we tried to check user power levels there were no state events available to get the user's power level and also no creation event so it defaulted to 0.

In fact with the way the test was laid out it was pretty timing dependent. I.e. the manual syncs managed to happen after the encryption was activated.

This reworks a little so that the connection sync loop is activated then we just wait on first the room base state loading, then the encryption signal coming through.

Copy link
Member

@KitsuneRal KitsuneRal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - just one more thing to delete :)

autotests/testolmaccount.cpp Outdated Show resolved Hide resolved
@nvrWhere nvrWhere changed the title Rework enableEncryption tet to be less timing dependent Rework enableEncryption test to be less timing dependent Sep 15, 2024
@KitsuneRal KitsuneRal merged commit dd8d3ea into quotient-im:dev Sep 16, 2024
@KitsuneRal KitsuneRal added the bug/fix The library doesn't work as expected label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/fix The library doesn't work as expected
Projects
Status: 0.9 - Done
Development

Successfully merging this pull request may close these issues.

2 participants