mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-14 18:18:02 +00:00
This fixes the test `ThreadedMemoryReactorClock` to support `removeSystemEventTrigger`, which in turn allows the shutdown triggers to run when `HomeServer.shutdown()` is called in the tests. Previously, `ThreadedMemoryReactorClock.removeSystemEventTrigger` raised a `NotImplementedError`, `cleanup_test_reactor_system_event_triggers` cleared the triggers by hand so that a homeserver could be garbage collected. `shutdown()` now removes them itself, so the helper goes. We can also remove all the `tearDown` implementations that tried to manually trigger the shutdown as its not longer necessary to do so manually. They also didn't work, as they indexed `reactor.triggers` as `[eventType][phase]` when the keys are `[phase][eventType]`