-
Notifications
You must be signed in to change notification settings - Fork 295
Debug and fix stuck test in PR #3602
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
Debug and fix stuck test in PR #3602
Conversation
The 'should decode data columns with columnMapper' test was hanging because the mock response didn't include an up-to-date control message. Without this message, the ShapeStream kept requesting more data in an infinite loop that blocked the event loop. This fix adds: 1. An up-to-date control message to the mock response body 2. The 'electric-up-to-date' header to signal completion This ensures the stream properly terminates after processing the initial data.
Add 30s default timeout in vitest.config.ts so any test that gets stuck in an infinite loop will fail fast with a clear timeout error instead of blocking CI indefinitely.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3602 +/- ##
===========================================
+ Coverage 61.97% 75.77% +13.79%
===========================================
Files 40 51 +11
Lines 1557 2753 +1196
Branches 104 406 +302
===========================================
+ Hits 965 2086 +1121
- Misses 591 665 +74
- Partials 1 2 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
commit: |
|
I've cancelled the stuck job after I noticed it had been running for 1 hour this morning. Still the same OOM error from running the test. Do you think we have a memory leak somewhere? |
|
@alco looks like it's working now — the problem was a infinite loop caused by using Promise.resolve() (resolves inside a microtask before timers run) so test timeouts didn't run. |
alco
left a comment
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.
👍
No description provided.