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

Add regression test for matrix-org/synapse#16463 #681

Merged
merged 5 commits into from
Oct 19, 2023

Conversation

erikjohnston
Copy link
Member

@erikjohnston erikjohnston requested review from a team as code owners October 18, 2023 14:32
tests/csapi/sync_test.go Outdated Show resolved Hide resolved
// 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)
Copy link
Member

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?)

Copy link
Member Author

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

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines +502 to +503
// 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.
Copy link
Member

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"?

Copy link
Member Author

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

tests/csapi/sync_test.go Show resolved Hide resolved
tests/csapi/sync_test.go Outdated Show resolved Hide resolved
tests/csapi/sync_test.go Show resolved Hide resolved
tests/csapi/sync_test.go Outdated Show resolved Hide resolved
Copy link
Member

@clokep clokep left a 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.

@erikjohnston erikjohnston merged commit fdfbde6 into main Oct 19, 2023
4 checks passed
@erikjohnston erikjohnston deleted the erikj/sync_backfill_limited branch October 19, 2023 15:12
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.

2 participants