Skip to content

Commit 01e1de0

Browse files
committed
msc2836: fix flakey test caused by /send returning 404
This test uses a `Waiter` to wait for an incoming request from the HS. If that request doesn't arrive in 1 second it fails the test. Previously, we had UnexpectedRequestsAreErrors=false in this test to not treat requests to /send as a failure. However, this would still 404 the /send endpoint. This would cause Dendrite to begin backing off that server (starting with a 1s backoff) which meant the Waiter would expire before /event_relationships would be sent. The fix is simple: 200 OK /send transactions.
1 parent 8035f8b commit 01e1de0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/msc2836_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,8 @@ func TestFederatedEventRelationships(t *testing.T) {
196196
srv := federation.NewServer(t, deployment,
197197
federation.HandleKeyRequests(),
198198
federation.HandleMakeSendJoinRequests(),
199+
federation.HandleTransactionRequests(nil, nil),
199200
)
200-
// we expect to be pushed transactions but don't care about them
201-
srv.UnexpectedRequestsAreErrors = false
202201
cancel := srv.Listen()
203202
defer cancel()
204203

0 commit comments

Comments
 (0)