This is an automated email from the ASF dual-hosted git repository.

Lee-W pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 5129c1f0d0e Fix flaky shared-stream overflow test that times out in CI 
(#68651)
5129c1f0d0e is described below

commit 5129c1f0d0e7f0c8c023ddac09da532b89d7033c
Author: PoAn Yang <[email protected]>
AuthorDate: Wed Jun 17 12:06:48 2026 +0900

    Fix flaky shared-stream overflow test that times out in CI (#68651)
---
 airflow-core/tests/unit/triggers/test_shared_stream.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/airflow-core/tests/unit/triggers/test_shared_stream.py 
b/airflow-core/tests/unit/triggers/test_shared_stream.py
index 152056ed389..76baa8bff61 100644
--- a/airflow-core/tests/unit/triggers/test_shared_stream.py
+++ b/airflow-core/tests/unit/triggers/test_shared_stream.py
@@ -1434,6 +1434,15 @@ async def 
test_ack_mode_queue_full_during_fanout_does_not_break_iteration():
 
         # t_ok: drive its ack stream and collect the real event.
         async with _consume_in_background(t_ok.filter_shared_stream(s_ok)) as 
ok_collector:
+            # Let the poll loop fan the event out and force QueueFull on 
trigger 1's
+            # pre-filled queue *before* draining s_full. Otherwise 
collect_full can pull
+            # the filler off the queue first, the fan-out put then succeeds, 
and the
+            # overflow path is never taken.
+            deadline = asyncio.get_event_loop().time() + 1.0
+            while 1 not in group._failed_subscribers:
+                assert asyncio.get_event_loop().time() < deadline, "fan-out 
did not overflow trigger 1"
+                await asyncio.sleep(0)
+
             await asyncio.wait_for(collect_full(), timeout=2.0)
             ok_result = await ok_collector.wait_for(1)
 

Reply via email to