fix: stabilize identify integration tests under parallel xdist load#1378
fix: stabilize identify integration tests under parallel xdist load#1378acul71 wants to merge 4 commits into
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Split make test into parallel and serial_only phases, harden identify handler address publication, and add test synchronization for the six load-sensitive identify/host/quic tests that failed under pytest -n auto. Co-authored-by: Cursor <cursoragent@cursor.com>
Closes #1377 Co-authored-by: Cursor <cursoragent@cursor.com>
The downloads/ tree is gitignored; keep INVESTIGATION.md local only. Co-authored-by: Cursor <cursoragent@cursor.com>
|
I created a fresh virtual environment, installed all dependencies, and ran the make pr command on macOS. All tests passed successfully; however, I encountered the following runtime warnings:
[gw4] [ 98%] PASSED tests/interop/zig_libp2p/test_zig_basic.py::test_zig_libp2p_placeholder
tests/core/transport/webrtc/test_connection.py::TestOpenStream::test_open_stream_increments_ids_by_2 Aside from these warnings, the test suite completed successfully. |
Summary
libp2p/identity/identify/identify.py)_identify_peerwaits for load-sensitive integration testsmake testinto parallel (-m "not serial_only") and serial phases for six flaky-under-load tests@pytest.mark.serial_onlyin pyproject.tomlCloses #1377
Root cause
Six identify/host/quic tests fail only under full-suite
pytest -n auto(~3060 tests), not in isolation. Investigation notes were kept local under downloads/ (gitignored, not in the repo).Not caused by #1372/#1374 logic changes; #1372 increased parallel suite load and exposed latent timing races.
Changed files
libp2p/identity/identify/identify.py,libp2p/tools/utils.pytests/utils/identify_test_helpers.py, identify/host/quic test filesMakefile,pyproject.toml,newsfragments/1377.bugfix.rstTest plan
make lintmake typecheckmake test(parallel + serial phases)make linux-docspytest -n auto --timeout=1200 tests/core(CI tox parity — 2807 passed locally)Notes for reviewers
wait_for_peerstore_addrsadded tolibp2p/tools/utils.pybut not wired into globalconnect()(caused suite-wide timeouts during investigation)make pronly; CI uses toxpytest -n auto tests/core, which passes with the production/test hardening aloneMade with Cursor