Skip to content

feat(code): fix flakey tesk#2052

Open
k11kirky wants to merge 1 commit into05-06-feat_code_unify_git_integration_to_use_git_store_and_always_use_new_git_user_integrationfrom
05-06-feat_code_fix_flakey_tesk
Open

feat(code): fix flakey tesk#2052
k11kirky wants to merge 1 commit into05-06-feat_code_unify_git_integration_to_use_git_store_and_always_use_new_git_user_integrationfrom
05-06-feat_code_fix_flakey_tesk

Conversation

@k11kirky
Copy link
Copy Markdown
Contributor

@k11kirky k11kirky commented May 6, 2026

Problem

The SSE keepalive test was intermittently hanging or failing because the setInterval mock was replacing all interval timers globally, including those used internally by undici, the HTTP server, and MSW. Without their periodic callbacks, those internals would stall and cause the test to hang.

Changes

  • The setInterval spy now passes non-keepalive timers through to the real setInterval, so only the SSE keepalive interval is intercepted and captured.
  • Increased the vi.waitFor timeout to 10 seconds with a 50ms polling interval to give the keepalive callback more time to register reliably.
  • Increased the read loop attempts from 5 to 10 to allow more time for SSE data to arrive.
  • Increased the overall test timeout from 20 to 30 seconds to accommodate the more lenient waiting behavior.

Copy link
Copy Markdown
Contributor Author

k11kirky commented May 6, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 6, 2026

Reviews (1): Last reviewed commit: "feat(code): fix flakey tesk" | Re-trigger Greptile

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