Files
synapse/tests/rest
Matthew Hodgson f19b419c91 ⏺ The stats handler processes events in a background process, triggered by a notifier callback. After room creation, the notifier fires, which schedules stats.notify_new_event as a background process. That process reads the
state deltas and populates room_stats_state and room_stats_current.

  With our 1ms fake time advancement, the background process may not have completed by the time create_room_as returns. The rooms are in the rooms table (with is_public=True), but room_stats_state and room_stats_current
  aren't populated yet, so the INNER JOIN in the public rooms query finds nothing.

  The fix: add event loop yields after room creation in the test's prepare method to let the stats handler process the events. Similar to the profile change fix:

fixes PublicRoomsRoomTypeFilterTestCase
2026-03-24 16:30:58 -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