-
-
Notifications
You must be signed in to change notification settings - Fork 33
🌿 Fix flaky tests and improve test utilities #443
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
Conversation
Replace manual timeout/interval handling with @std/async's abortable and delay functions. Using AbortSignal.timeout prevents resource leaks compared to setTimeout.
Remove unnecessary try-catch block in abort function and improve error message clarity when server fails to return an address.
- Add proper async handling for concurrent server start calls - Increase timeouts for server status checks to reduce flakiness - Improve error handling and assertion messages for better debugging - Add explicit wait conditions to ensure operations complete before assertions
WalkthroughThis update refactors and stabilizes several server-related test cases by introducing explicit asynchronous handling, delays, and retry logic. It also simplifies utility functions for waiting and aborting, clarifies error messages, and marks certain flaky test steps. No changes are made to exported function signatures. Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Test Case
participant Vim as Vimscript Function
participant Server as Denops Server
Test->>Vim: Start server (async)
Vim->>Server: denops#server#start()
Server-->>Vim: Starting/Preparing state
Vim-->>Test: Set completion flag
Test->>Vim: Check server status before ready event
Vim->>Server: denops#server#status()
Server-->>Vim: 'preparing'
Vim-->>Test: Return status
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (6)
🧰 Additional context used🧬 Code Graph Analysis (3)tests/denops/testutil/shared_server_test.ts (1)
tests/denops/runtime/functions/server/start_test.ts (1)
tests/denops/runtime/functions/server/status_test.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms (9)
🔇 Additional comments (12)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #443 +/- ##
==========================================
+ Coverage 95.59% 95.83% +0.23%
==========================================
Files 25 25
Lines 1430 1415 -15
Branches 183 181 -2
==========================================
- Hits 1367 1356 -11
+ Misses 60 56 -4
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Flaky failures tend to occur more frequently in high-performance environments. This happens in two scenarios:
Both cases create race conditions where the relative speed difference between the test suite and the system under test causes unreliable test results. This is why adding proper synchronization, explicit waits, and timeout adjustments is crucial for test stability across different hardware configurations. |
nice! |
Summary
This PR addresses flaky tests in the denops server test suite by improving timing, error handling, and test utilities.
Changes
Test plan
Related issues
Fixes intermittent test failures in CI, particularly in server start/stop/status tests.
Summary by CodeRabbit