mirror of
https://github.com/qdrant/qdrant.git
synced 2026-08-05 01:20:53 -05:00
* ci: parallelize consensus tests with pytest-xdist
Enable pytest-xdist for consensus_tests to run tests across multiple
workers in parallel, significantly reducing CI wall time (~20min → ~5-7min).
Changes:
- Add `-n auto --dist=loadfile` to the consensus test pytest invocation
- Remove hardcoded port_seed from tests that don't need fixed ports for
restart/rejoin (test_order_by, test_consensus_compaction,
test_named_vector_crud, test_listener_node)
- Give test_cluster_rejoin its own PORT_SEED=15000 to avoid port
conflicts with auth tests (PORT_SEED=10000)
- Derive restart ports from killed PeerProcess objects instead of
hardcoded arithmetic where possible
- Add xdist_group("auth") marker to auth test files to ensure they
run on the same worker (they share PORT_SEED=10000)
Made-with: Cursor
* fix: remove remaining hardcoded port_seed=20000 causing parallel test conflicts
8 test files were using port_seed=20000 as a positional argument to
start_cluster(), which was missed in the initial change. When running
in parallel with pytest-xdist, multiple workers would try to bind to
the same port range (20000-20x02), causing port conflicts and cascading
test failures.
Also remove port_seed=23000 from test_snapshot_recovery_kill.py since
it doesn't need fixed ports for restart.
Made-with: Cursor
* fix: use saved port for restart in test_two_follower_nodes_down
The test was restarting killed peers on hardcoded ports (20200/20100)
that previously matched port_seed=20000. After switching to random
ports, the restart ports no longer match the original peer ports,
causing raft state URI mismatches and peer startup failures.
Save the p2p_port from the killed PeerProcess and reuse it for restart.
Made-with: Cursor
* Reuse p2p ports when restarting killed peers in consensus tests
When a peer is killed and restarted with random ports, it gets a new
consensus URI. The cluster needs a Raft operation to update this URI,
which under CPU contention from parallel test workers can exceed the
30-second timeout. Fix by capturing each peer's p2p_port before killing
and reusing it on restart, so the URI stays the same and no consensus
update is needed.
Made-with: Cursor
* A few improvements for parallel runs (#8731)
* fix: make auth tests' PORT_SEED per-worker to avoid port collisions
* ci: improve failure visibility for parallel consensus tests
* Three small changes to make hangs, interleaved output, and coverage runs behave predictably under pytest-xdist
* fix: two test bugs surfaced by parallel runs and revert drop PR_SET_PDEATHSIG helper
* fix: wait for count convergence in test_triple_replication
* fix: clean leaked peer processes at test start
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Cursor Agent <agent@cursor.com>
Co-authored-by: tellet-q <166374656+tellet-q@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
41 lines
1.1 KiB
TOML
41 lines
1.1 KiB
TOML
[project]
|
|
name = "qdrant-test-deps"
|
|
version = "0.0.1"
|
|
requires-python = ">=3.10,<4"
|
|
dependencies = [
|
|
"grpc-interceptor>=0.15,<0.16",
|
|
"grpc-requests>=0.1,<0.2",
|
|
"more-itertools>=10.8,<11",
|
|
"pyjwt>=2.10,<3",
|
|
"jsons>=1.6.3,<2",
|
|
"pytest>=8.4,<9",
|
|
"pytest-timeout>=2.4,<3",
|
|
"pytest-cases>=3.9.1,<4",
|
|
"requests>=2.32.5,<3",
|
|
"schemathesis>=3.39.16,<4",
|
|
"retry>=0.9.2,<0.10",
|
|
"docker>=7.1.0,<8",
|
|
"pytest-xdist>=3.8.0,<4",
|
|
"pytest-subtests>=0.14.1,<0.15",
|
|
"qdrant-client>=1.16.1,<2",
|
|
"tqdm>=4.67.1,<5",
|
|
]
|
|
|
|
[tool.uv]
|
|
package = false
|
|
|
|
[tool.pytest.ini_options]
|
|
markers = [
|
|
"longrunning: marks tests as long-running (deselect with '-m \"not longrunning\"')",
|
|
"xdist_group: group tests to run on the same worker (for pytest-xdist)",
|
|
]
|
|
# Surface hangs at 30 min with a traceback instead of the 60 min job kill.
|
|
timeout = 1800
|
|
addopts = """
|
|
--dist=loadgroup
|
|
"""
|
|
filterwarnings = [
|
|
"ignore:jsonschema.RefResolver is deprecated:DeprecationWarning:schemathesis",
|
|
"ignore:jsonschema.exceptions.RefResolutionError is deprecated:DeprecationWarning:schemathesis",
|
|
]
|