add support for parallel run#739
Merged
ihrpr merged 2 commits intomodelcontextprotocol:mainfrom May 23, 2025
lk-naath:parallel-tests
Merged
add support for parallel run#739ihrpr merged 2 commits intomodelcontextprotocol:mainfrom lk-naath:parallel-tests
ihrpr merged 2 commits intomodelcontextprotocol:mainfrom
lk-naath:parallel-tests
Conversation
Reported-by: lekhnath-parajuli-nexyom <lekhnath.parajuli@nexyom.com>
There was a problem hiding this comment.
Positive aspects:
- pytest-xdist is already in the dev dependencies (line 55), so parallel execution is supported
- Parallel test execution can significantly speed up test runs
- The PR addresses issue #736
Issues and Concerns:
- Hardcoded parallelism: Setting --numprocesses 4 hardcodes the parallelism level. This might not be optimal for:
- CI environments with different CPU counts
- Developer machines with fewer cores
- Better to use --numprocesses auto or -n auto to automatically detect CPU count - Warnings suppression: --disable-warnings is problematic:
- The project already carefully manages warnings with filterwarnings
- Suppressing all warnings could hide important deprecation or other warnings
- This conflicts with the existing warning configuration - Logging configuration: The [tool.pytest_env] section is not a standard pytest configuration
- This might not work as intended
- Better to use pytest's built-in logging configuration - Verbosity: -vv might be too verbose for regular test runs
- Could clutter CI output
- Better left to developer preference via command line
Recommendations:
- Change --numprocesses 4 to --numprocesses auto
- Remove --disable-warnings to respect existing warning filters
- Remove -vv from default options
- Remove the [tool.pytest_env] section and use proper pytest logging configuration if needed
ihrpr
requested changes
May 23, 2025
Contributor
ihrpr
left a comment
There was a problem hiding this comment.
Thank you so much for working on this.
Some concerns highlighted in the comments, please can those be addressed?
Reported-by: lekhnath-parajuli-nexyom <lekhnath.parajuli@nexyom.com>
Contributor
Author
|
hey @ihrpr, I've implemented the suggested changes to improve the pytest configuration in pyproject.toml:
Please review these changes and let me know if you'd like any further adjustments. |
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.
@jerome3o-anthropic @jspahrsummers not able to add you guys as reviewer, please help me out here.
Ticket: #736
Added pytest configuration to enable parallel test execution and disable logging during tests for faster and cleaner test runs.
Motivation and Context
Running tests sequentially was causing longer test suite execution times, slowing down development and CI feedback. Enabling parallel test runs with multiple workers improves overall testing speed and efficiency.
How Has This Been Tested?
Tests were run locally with the new configuration enabled. Verified that:
Breaking Changes
No breaking changes. This update only affects how tests are executed, not the application code or configurations.
Types of changes
Checklist
Additional context
Uses pytest-xdist plugin for parallel test execution with --numprocesses 4
Disables logging during tests to reduce noise and improve test output clarity.