-
Notifications
You must be signed in to change notification settings - Fork 60
Fix setup for TestMembersLocal
tests and split into sync types
#563
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
Conversation
Split "Existing members see new members' presence" `TestMembersLocal` test into initial and incremental sync variants.
Explicitly set Bob's presence to online, since the spec does not guarantee that Bob will have a non-offline presence after joining a room, nor does the spec guarantee that offline presences will show up in initial syncs.
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.
Many thanks for digging into this Sean, LGTM
I had to move Bob's join out of the test case, since it was getting queued after the two test cases that relied upon it. |
To check: was that just an oversight in porting the test to complement? |
Looks like it. In the sytest, Bob joins the room as part of the setup. When I split the last test case into two, it changed the pattern in which the tests run and made it a problem. |
Thanks for all the fast reviews today! |
The tests in this PR aren't run on Dendrite, and the Dendrite CI failures seen are also happening on main. |
This was already being addressed in #516, I would appreciate it if that PR was given attention instead of concurrent changes being merged at the same time. |
This PR is also faulty, it uses As this was already pre-determined in that PR, that apparently was not looked for, I will also be fixing this issue in that PR. |
Depending on timings, the "Existing members see new members' presence"
test in
TestMembersLocal
may see the expected join and presence in aninitial or incremental sync. Both types of sync elicit different
behaviour in homeserver implementations, such as Synapse. Split the test
into initial and incremental sync variants to eliminate the race
condition.
In addition, fix the initial sync case by explicitly setting Bob's
presence to online. The spec does not guarantee that Bob will have a
non-offline presence after merely joining a room, nor does the spec
guarantee that offline presences will show up in initial syncs.
Fixes matrix-org/synapse#13199.