fix: Fix mocker+router segfaults + reliability fixes#7162
Conversation
92b1041 to
e85a1f4
Compare
8341c63 to
e85a1f4
Compare
9d7d679 to
7db174e
Compare
7db174e to
e8ade26
Compare
Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
fde5c1e to
511ac56
Compare
WalkthroughThis pull request refactors subprocess management in test utilities by consolidating cleanup logic into a centralized helper method, re-enables a previously skipped test, increases timeout thresholds for two tests, and updates configuration settings. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/utils/managed_process.py`:
- Around line 348-358: In _stop_started_processes, don't treat a wait timeout as
success: when terminate_process_tree(process.pid, ...) or
process.wait(timeout=...) raises a timeout, retry a forceful shutdown (e.g., use
process.kill() or call terminate_process_tree with a force parameter), re-wait
for exit, then only clear the Popen handle via setattr(self, attr_name, None)
after process.poll() confirms the process exited; if the process still hasn't
exited, raise a specific exception so callers (like NatsServer.stop) can detect
failure instead of proceeding with a stale handle. Also catch specific
exceptions (TimeoutExpired, OSError) rather than Exception and re-raise or
handle deterministically per the guidelines.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2e9e9859-7152-4434-b980-ca33c7877d78
📒 Files selected for processing (4)
pyproject.tomltests/conftest.pytests/router/test_router_e2e_with_mockers.pytests/utils/managed_process.py
Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
Overview:
Details:
Where should the reviewer start?
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit
Tests
Chores