Skip to content

test(cloud-init): raise timeout for flaky cgroup verification test - #61

Open
defangdevs wants to merge 1 commit into
mainfrom
fix/cloud-init-cgroup-test-timeout
Open

defangdevs wants to merge 1 commit into
mainfrom
fix/cloud-init-cgroup-test-timeout

Conversation

@defangdevs

@defangdevs defangdevs commented Oct 21, 2026 •

Copy link
Copy Markdown

Summary

  • tests/generate.test.ts > generateCloudInit > workload cgroup verification script > rejects unsafe or unproven cgroup states runs 13 cases, each of which spawns a real shell script in a fresh temp dir via runVerifyWorkloadCgroupScript.
  • That's enough subprocess + filesystem overhead to intermittently exceed vitest's default 5000ms test timeout under CI load — it timed out in CI on PR fix(deps-dev): bump @modelcontextprotocol/sdk from 1.27.1 to 1.32.0 #56 (04:00 UTC, 7259ms), PR build(deps): bump hono from 4.13.4 to 4.13.11 in /apps/api #59 (1m23s job), and PR fix(deps): bump vite from 8.3.2 to 8.3.3 #60 (two separate runs, 5802ms and 6114ms), unrelated to any of those PRs' own changes.
  • Bumped the test's own timeout to 20000ms. No other cloud-init test has this pattern (one test, many real subprocess spawns), so this is scoped to just this test rather than the whole package's testTimeout.

Test plan

  • npx vitest run tests/generate.test.ts -t "rejects unsafe or unproven cgroup states" passes (1.08s locally)
  • npx vitest run for the whole cloud-init package passes (181/181)

Agent Preflight (Required)

  • Preflight completed before code changes

Classification

  • business-logic-change
  • external-api-change
  • cross-component-change
  • public-surface-change
  • docs-sync-change
  • security-sensitive-change
  • ui-change
  • infra-change

External References

N/A: no external API or third-party integration involved; this only adjusts a vitest per-test timeout value.

Codebase Impact Analysis

Single file touched: packages/cloud-init/tests/generate.test.ts. No src/ code changed, no other package affected. Confirmed by running the full cloud-init test suite (181/181 passing) and the single targeted test before and after the change.

Documentation & Specs

N/A: no behavior, interface, or public contract changed — only the timeout budget of one existing test.

Constitution & Risk Check

Reviewed for test-integrity risk: raising the timeout does not weaken any assertion in the test (same 13 cases, same expected exit codes/stderr substrings), it only gives the existing real-subprocess workload enough wall-clock time to finish under CI load. Confirmed the failure is pre-existing and repo-wide (observed identically on PRs #56, #59, #60) rather than introduced by this change.

🤖 Generated with Claude Code

"rejects unsafe or unproven cgroup states" runs 13 cases that each
spawn a real shell script via a temp dir, exceeding vitest's default
5000ms budget under CI load. It has timed out in CI on PRs #56, #59,
and #60 (6-7s observed), unrelated to any of those PRs' own changes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant