-
Notifications
You must be signed in to change notification settings - Fork 67
feat: implement per-test timeout limits for slow test investigation #780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
aaronsteers
wants to merge
2
commits into
main
Choose a base branch
from
devin/1757451353-investigate-slow-tests
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Test Timeout Configuration | ||
|
||
This document explains PyAirbyte's test timeout configuration to prevent CI timeouts, particularly on Windows. | ||
|
||
## Current Configuration | ||
|
||
- **Global test timeout**: 600 seconds (10 minutes) per test | ||
- **CI job timeout**: 60 minutes for pytest jobs | ||
- **pytest-timeout plugin**: v2.4.0 installed | ||
|
||
## Timeout Strategy | ||
|
||
### Per-Test Timeouts | ||
- **Unit tests**: 60 seconds (fast execution expected) | ||
- **Integration tests**: 180 seconds (3 minutes for data operations) | ||
- **Slow tests**: Use existing 600 second global timeout | ||
|
||
### Session Timeouts | ||
- **Full test suite**: 3600 seconds (1 hour maximum) | ||
- **Windows CI**: Limited to unit tests only to prevent timeouts | ||
|
||
Comment on lines
+18
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Windows scope is inaccurate. Doc says “Windows CI: Limited to unit tests,” but the workflow runs the full matrix on Windows. Shall we update this to reflect current behavior, wdyt? 🤖 Prompt for AI Agents
|
||
## Usage Examples | ||
|
||
```bash | ||
# Run tests with custom per-test timeout | ||
pytest --timeout=120 tests/unit_tests/ | ||
|
||
# Run integration tests with timeout and duration reporting | ||
poetry run poe test-integration-timeout | ||
|
||
# Analyze slow test patterns | ||
poetry run poe test-slow-analysis | ||
``` | ||
|
||
## Slow Test Analysis | ||
|
||
The following integration tests are marked as slow and may cause Windows CI timeouts: | ||
- source-faker tests with 200-300 record scales | ||
- Tests parametrized across multiple cache types (DuckDB, Postgres, BigQuery, Snowflake) | ||
- Docker-based tests (slower on Windows due to Docker performance) |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version mismatch: plugin version in doc vs dependency.
Doc says “pytest-timeout v2.4.0 installed,” but pyproject pins ^2.3.1. Either bump the dep or reword to “pytest-timeout >=2.3.0,” wdyt? Note:
--session-timeout
is available since 2.3.0. (pypi.org)🤖 Prompt for AI Agents