Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/msc3030_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ func TestJumpToDateEndpoint(t *testing.T) {
contextResResBody := client.ParseJSON(t, contextRes)
Copy link
Copy Markdown
Collaborator Author

@MadLittleMods MadLittleMods Oct 6, 2022

Choose a reason for hiding this comment

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

Fixes matrix-org/synapse#13944?

@squahtx I don't think this fixes that issue. The error there is:

msc3030_test.go:200: CSAPI.MustDoFunc response return non-2xx code: 403 Forbidden - body: {"errcode":"M_FORBIDDEN","error":"You don't have permission to access that event."}

which indicates we also need to retry the /context request above until it works

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in a separate PR: matrix-org/synapse#14096

paginationToken := client.GetJSONFieldStr(t, contextResResBody, "end")

// Hit `/messages` until `eventA` has been backfilled and replicated across
// workers (the worker persisting events isn't necessarily the same as the worker
// serving `/messages`)
fetchUntilMessagesResponseHas(t, remoteCharlie, roomID, func(ev gjson.Result) bool {
return ev.Get("event_id").Str == eventA.EventID
})

// Paginate backwards from eventB
messagesRes := remoteCharlie.MustDoFunc(t, "GET", []string{"_matrix", "client", "r0", "rooms", roomID, "messages"}, client.WithContentType("application/json"), client.WithQueries(url.Values{
"dir": []string{"b"},
Expand Down