-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add regression test for matrix-org/synapse#16463 #681
Conversation
// Alice should observer that she receives some (though not all) of charlie's | ||
// events, with the `limited` flag set. | ||
func TestSyncTimelineGap(t *testing.T) { | ||
runtime.SkipIf(t, runtime.Dendrite) |
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.
Out of curiosity, do we know this fails on dendrite?
(As I mentioned in #synapse-dev, does this need a spec clarification at all?)
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.
Err, good Q. I can try removing it and seeing what happens
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.
Looks like it fails! Which brings me back to a question I asked somewhere else -- does this require spec clarifications?
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.
Yup, looks like it. The current spec says this about limited
:
True if the number of events returned was limited by the limit on the filter.
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.
// Check that we only see Alice's message from before the gap *before* | ||
// we seen any limited batches, and vice versa for Charlie's messages. |
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'm not following this comment. Is "seen" supposed to be "see"?
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.
Yes, it is mean to be "see". There are two valid scenarios: 1) we sync and see Alice's message, then we sync again and see charlie's messages with limited
set to true, or 2) we just see charlie's messages with limited set to true
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 this is OK, modulo it being really confusing and the comments could possibly be expanded a bit more. I made some suggestions, but not sure they're helpful.
Co-authored-by: Patrick Cloke <[email protected]>
This reverts commit 6c917fb.
c.f. matrix-org/synapse#16463 and matrix-org/synapse#16485