From 972777926af784e28c1f3a0d29040890cb8b66ea Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 30 Apr 2026 13:42:20 +0100 Subject: [PATCH] Ensure we don't wait for the timeout --- .../sliding_sync/test_rooms_required_state.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/rest/client/sliding_sync/test_rooms_required_state.py b/tests/rest/client/sliding_sync/test_rooms_required_state.py index 7f8fad0f6b..9b12790f1c 100644 --- a/tests/rest/client/sliding_sync/test_rooms_required_state.py +++ b/tests/rest/client/sliding_sync/test_rooms_required_state.py @@ -2301,11 +2301,18 @@ class SlidingSyncRoomsRequiredStateTestCase(SlidingSyncBase): [EventTypes.Create, ""], ] - response_body, _ = self.do_sync( - sync_body, since=from_token, tok=user1_tok, timeout=Duration(seconds=10) + channel = self.make_sync_request( + sync_body, + since=from_token, + tok=user1_tok, + timeout=Duration(seconds=10), + await_result=False, ) - # We should see the new `required_state` immediately without waiting. + # We should see the new `required_state` immediately without waiting + # (for the full timeout, we may need to wait briefly). + channel.await_result(timeout_ms=100) + response_body = channel.json_body self._assertRequiredStateIncludes( response_body["rooms"][room_id1]["required_state"], {