Skip to content

Commit 0d3a30c

Browse files
authored
Merge pull request #642 from element-hq/bbz/routing-test-flakes
Fix flakes in Synapse worker routing test
2 parents 8b2950a + b3e9bdb commit 0d3a30c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

newsfragments/642.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Synapse: fix requests being routed to initial-synchrotron incorrectly.

tests/integration/test_synapse.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ async def test_routes_to_synapse_workers_correctly(
117117

118118
assert len(matching_lines) > 0, f"Requests for {path} did not appear in the HAProxy logs"
119119
for matching_line in matching_lines:
120+
# During the upgrade tests these requests may NOSRV as Synapse processes are down
121+
# We eventually succeed, so just ignore the requests that were retried
122+
if " 503 " in matching_line and " synapse-main/<NOSRV> " in matching_line:
123+
continue
124+
125+
# We know we end up here at least once as 2xx/401/405 won't match the above check
120126
assert f"synapse-http-in synapse-{backend}" in matching_line, f"{path} was routed unexpectedly"
121127

122128

0 commit comments

Comments
 (0)