run tests in parallel#28
Merged
Merged
Conversation
conftest now derives a worker id from PYTEST_XDIST_WORKER, assigns a distinct (port1, port2) pair via env vars before importing test_config, and chdirs each worker into its own tmpdir at session start. udpproxy and keydb.py both read keys.tdb from cwd, so per-worker cwd is enough to keep workers' database state isolated. test_config exposes absolute KEYDB_PY / UDPPROXY_BIN paths so tests still resolve them after chdir. test_authentication switches all subprocess calls to KEYDB_PY. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace the bash logic in run_tests.sh with run_tests.py, which builds udpproxy and runs pytest twice (connections, then authentication) with optional -n J for pytest-xdist parallelism. run_tests.sh becomes a thin shim that activates the venv and execs the Python runner so existing CI and README invocations keep working. Add pytest-xdist to setup_ci.sh. The keys.tdb backup/restore dance in the old script is dropped: workers now use per-worker tmpdirs, so the repo-root keys.tdb is never touched. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
GitHub-hosted ubuntu-latest runners have 4 vCPUs, and the new test harness supports pytest-xdist parallelism via run_tests.sh -j N. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
allows expansion of tests without long waits