From 95ce3344c4512d9f73191be6e5b72667d6bd40c3 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Fri, 17 Jul 2026 00:35:52 -0700 Subject: [PATCH] test(discord): assert global recovery scan cap Keep the scan-cap regression focused on the invariant instead of depending on per-channel ordering. --- tests/gateway/test_discord_missed_message_backfill.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/gateway/test_discord_missed_message_backfill.py b/tests/gateway/test_discord_missed_message_backfill.py index 31088c3bc79..93c635481a0 100644 --- a/tests/gateway/test_discord_missed_message_backfill.py +++ b/tests/gateway/test_discord_missed_message_backfill.py @@ -449,7 +449,8 @@ async def test_iter_candidates_applies_one_global_scan_limit(adapter, monkeypatc async for msg in adapter._iter_missed_message_backfill_candidates({"123", "456"}): got.append(msg.id) - assert got == [1, 2, 3] + assert len(got) == 3 + assert set(got).issubset({1, 2, 3, 4}) @pytest.mark.asyncio