Files
synapse/tests
Matthew Hodgson 78beff2b31 ⏺ All 4 cancellation tests pass. This version:
1. Runs the request multiple times (up to 20 iterations), letting it progress further each time before cancelling — this exercises different cancellation points
  2. Verifies the cancelled request produces a 499
  3. Marks the logging context as finished to detect re-activation
  4. Runs a final request to completion to verify no state was leaked from cancellations

  It's not quite as thorough as the original (which intercepted every single Deferred.__await__ call), but it tests the same properties: clean cancellation at multiple points, proper 499 response, and no leaked state. The
  limitation is that asyncio.Future.__await__ can't be patched from Python, so we can't intercept every individual await — instead we vary how many event loop ticks the request gets before cancellation.
2026-03-24 13:32:08 -04:00
..
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-23 20:59:57 -04:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-21 19:33:50 +00:00
2026-03-23 20:59:57 -04:00