Skip to content

Conversation

@KyleAMathews
Copy link
Contributor

No description provided.

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
Copy link

codecov bot commented Dec 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.77%. Comparing base (8fd8c8f) to head (736aa1d).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

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     
Flag Coverage Δ
electric-telemetry 22.71% <ø> (ø)
elixir 57.74% <ø> (ø)
elixir-client 74.47% <ø> (ø)
packages/experimental 87.73% <ø> (ø)
packages/react-hooks 86.48% <ø> (ø)
packages/typescript-client 93.72% <ø> (?)
packages/y-electric 55.66% <ø> (ø)
typescript 88.08% <ø> (+15.35%) ⬆️
unit-tests 75.77% <ø> (+13.79%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 13, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@electric-sql/react@3602
npm i https://pkg.pr.new/@electric-sql/client@3602
npm i https://pkg.pr.new/@electric-sql/y-electric@3602

commit: 736aa1d

@alco
Copy link
Member

alco commented Dec 13, 2025

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?

@KyleAMathews
Copy link
Contributor Author

@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.

Copy link
Member

@alco alco left a comment

Choose a reason for hiding this comment

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

👍

@KyleAMathews KyleAMathews merged commit 183ce9b into main Dec 13, 2025
45 checks passed
@KyleAMathews KyleAMathews deleted the claude/debug-stuck-test-017crykW9sUHjBJHkstqzHPW branch December 13, 2025 23:16
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.

4 participants