Skip to content

Commit 831fbed

Browse files
test: xfail legacy flaky test (#1028)
`tests/integration/test_scenarios.py::test_scenario_initial_task_types[new_task-streaming-legacy]` is flaky, given that it's legacy and is not used - `xfail` it. This file is currently used as a live documentation of legacy and new executor behavior differences and bug fixes, so there is some value in keeping this specific scenario for both legacy and new in case we want to compare this behavior from some other aspect. Example failures: - https://github.com/a2aproject/a2a-python/actions/runs/24995840443/job/73192514384 - https://github.com/a2aproject/a2a-python/actions/runs/25041293011/job/73344930927 --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent cfeb2a9 commit 831fbed

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

tests/integration/test_scenarios.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1933,8 +1933,21 @@ async def listen_to_end():
19331933
)
19341934
@pytest.mark.parametrize('initial_task_type', ['new_task', 'status_update'])
19351935
async def test_scenario_initial_task_types(
1936-
use_legacy, streaming, initial_task_type
1936+
request, use_legacy, streaming, initial_task_type
19371937
):
1938+
if use_legacy and streaming and initial_task_type == 'new_task':
1939+
# There is a race condition which manifests itself in flaky CI failures.
1940+
# Given that we don't use legacy by default anymore, xfail it.
1941+
# Flakiness rate is around 1 failure per 30 runs, so use strict=False
1942+
# to avoid failing on a passing xfail.
1943+
request.node.add_marker(
1944+
pytest.mark.xfail(
1945+
reason='https://github.com/a2aproject/a2a-python/issues/869',
1946+
strict=False,
1947+
raises=ValueError,
1948+
)
1949+
)
1950+
19381951
started_event = asyncio.Event()
19391952
continue_event = asyncio.Event()
19401953

0 commit comments

Comments
 (0)