Tests: fix two CI flakes seen on main #68

Merged
jared merged 1 commits from test-flakes into main 2026-11-23 01:58:18 -05:00
Owner

Both failures blocked the main deploys for #65 and #66 tonight. Neither was a product bug.

  • calculateNextRun interval test (unit): the result is now bounded by the clock just before and just after the call. The first call loads cron-parser; once, on a loaded runner, that took 30 s, which broke the fixed 1-second tolerance.
  • ECONNRESET in integration tests: the server dropped the connection right as the abort test reused it. Node's HTTP server closes idle keep-alive connections after 5 s, and the test client occasionally picks one up at that exact moment. The server itself was fine: it handled the abort with a 200, and every later suite passed. The helper now retries a GET once on a connection reset; writes are never retried.

🤖 Generated with Claude Code

Both failures blocked the `main` deploys for #65 and #66 tonight. Neither was a product bug. - **`calculateNextRun` interval test (unit):** the result is now bounded by the clock just before and just after the call. The first call loads `cron-parser`; once, on a loaded runner, that took 30 s, which broke the fixed 1-second tolerance. - **ECONNRESET in integration tests:** the server dropped the connection right as the abort test reused it. Node's HTTP server closes idle keep-alive connections after 5 s, and the test client occasionally picks one up at that exact moment. The server itself was fine: it handled the abort with a 200, and every later suite passed. The helper now retries a **GET** once on a connection reset; writes are never retried. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jared added 1 commit 2026-11-23 00:58:04 -05:00
Tests: fix two CI flakes seen on main
CI / Lint (eslint) (pull_request) Successful in 27s
CI / Test (jest) (pull_request) Successful in 1m4s
CI / Security (npm audit) (pull_request) Successful in 39s
CI / Integration (api) (pull_request) Successful in 4m18s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 3m50s
CI / UI screenshots (before/after) (pull_request) Successful in 10s
CI / UI (playwright) (pull_request) Successful in 2m39s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped
CI / UI screenshots (before/after) (push) Skipped
CI / Test (jest) (push) Successful in 1m15s
CI / Lint (eslint) (push) Successful in 1m20s
CI / Security (npm audit) (push) Successful in 27s
CI / Integration (api) (push) Successful in 3m42s
CI / Scan (secrets, workflows, shell) (push) Successful in 3m11s
CI / UI (playwright) (push) Successful in 2m38s
CI / Deploy (push) Skipped
CI / Deploy worker (push) Skipped
CI / Notify (push) Skipped
6d289a3bce
- calculateNextRun interval: bounded by the clock before and after the
  call (its first use loads cron-parser, which took 30 s once on a loaded
  runner and broke the fixed 1 s tolerance).
- Integration helper: retry a GET once when a pooled keep-alive connection
  is reset (ECONNRESET as the server closes it); writes are never retried.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jared merged commit 93b1422300 into main 2026-11-23 01:58:18 -05:00
jared deleted branch test-flakes 2026-11-23 01:58:22 -05:00
Sign in to join this conversation.