Skip to content

Conversation

@twangodev
Copy link
Collaborator

@twangodev twangodev commented Dec 9, 2025

Summary by CodeRabbit

  • Tests

    • Enhanced WebSocket integration tests with automatic retry capability to improve test stability.
  • Chores

    • Updated development dependencies to support test retry functionality.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings December 9, 2025 01:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai
Copy link

coderabbitai bot commented Dec 9, 2025

Walkthrough

Added pytest-rerunfailures dependency to development environment and applied retry decorators to two WebSocket streaming integration tests to improve test reliability for intermittent failures.

Changes

Cohort / File(s) Summary
Dependency Management
pyproject.toml
Added pytest-rerunfailures>=16.0.1 to dev dependency group
Test Reliability
tests/integration/test_tts_websocket_integration.py
Applied @pytest.mark.flaky(reruns=2, reruns_delay=1) decorator to test_websocket_streaming_with_different_models and test_async_websocket_streaming_with_different_models to enable automatic retries on failure

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

  • Straightforward dependency addition with no version conflict risk
  • Repetitive decorator pattern applied consistently across two test methods
  • No logic changes or functional modifications

Poem

🐰 A hop, skip, and retry away,
Our tests now have resilience to stay,
When flaky WebSockets cause dismay,
They'll bounce back—hooray!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title claims to update fish-audio-sdk version to 1.1.0, but the actual changes add pytest-rerunfailures dependency and flaky test decorators. Update the title to accurately reflect the main changes, such as 'chore(test): add pytest-rerunfailures and mark flaky WebSocket tests' or 'chore(test): add test retry logic for WebSocket streaming tests'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/sync

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 26d188e and b04c006.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • pyproject.toml (1 hunks)
  • tests/integration/test_tts_websocket_integration.py (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Integration Tests
  • GitHub Check: Integration Tests
🔇 Additional comments (3)
pyproject.toml (1)

56-66: pytest-rerunfailures dev dependency looks correct; confirm CI/dev install path

Adding pytest-rerunfailures>=16.0.1 is consistent with pytest>=8.3.5 and supports the @pytest.mark.flaky(reruns=..., reruns_delay=...) usage you added in tests.(pytest-rerunfailures.readthedocs.io)

Just make sure your local and CI workflows install the dev dependency group (or otherwise install pytest-rerunfailures), so the flaky marker is available when running tests.

tests/integration/test_tts_websocket_integration.py (2)

37-56: Targeted flaky retry on sync multi-model WebSocket test looks good

Using @pytest.mark.flaky(reruns=2, reruns_delay=1) here is a reasonable way to tame intermittent WebSocket / remote API issues while keeping the main assertion logic unchanged. Syntax matches the plugin’s recommended usage.(github.com)

Just keep an eye on this test in CI: if failures become frequent rather than sporadic, it may be worth revisiting the underlying cause instead of relying on retries.


223-249: Async test’s flaky + asyncio markers are compatible and appropriately scoped

Stacking @pytest.mark.flaky(reruns=2, reruns_delay=1) with @pytest.mark.asyncio on this async multi-model streaming test is fine; both markers are supported and commonly combined this way with pytest-rerunfailures.(github.com)

Same note as the sync test: verify in CI that this remains a genuinely intermittent failure and that the plugin is installed wherever tests run.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@twangodev twangodev merged commit a56b90c into main Dec 9, 2025
24 checks passed
@twangodev twangodev deleted the chore/sync branch December 9, 2025 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants