Skip to content

test: split lease integration tests by behavior (Phase 2)#46

Merged
ferueda merged 10 commits into
chore/v1-release-prepfrom
chore/test-speedup-phase2
Jun 12, 2026
Merged

test: split lease integration tests by behavior (Phase 2)#46
ferueda merged 10 commits into
chore/v1-release-prepfrom
chore/test-speedup-phase2

Conversation

@ferueda

@ferueda ferueda commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

Phase 2 of the test speedup plan: split monolithic lease.integration.test.ts into behavior-oriented files so Vitest can parallelize lease scenarios across workers.

File Tests
lease-acquire.integration.test.ts 6
lease-hooks.integration.test.ts 5
lease-release.integration.test.ts 11
lease-repair.integration.test.ts 10
lease-destroy.integration.test.ts 4

Shared helpers in helpers/lease-integration.ts (registerLeaseIntegrationCleanup, failOnceHook).

No assertion or behavior changes — move-only refactor.

Timing (local)

Metric Phase 1 baseline Phase 2
Test files 13 17
Wall time ~28s ~28s
Tests 147 147

Wall time is similar on this machine (already fast post-Phase 1), but the critical-path serial lease file is gone — lease files now run across maxWorkers: 2. Main win is parallel ownership and clearer test boundaries.

Test plan

  • pnpm check — 147 tests pass
  • All 36 former lease integration scenarios preserved
  • No production code changes

Follow-up

ferueda added 10 commits June 12, 2026 10:27
Move 36 lease integration scenarios into acquire, hooks, release,
repair, and destroy files so Vitest can parallelize across workers.
Shared cleanup and failOnceHook live in lease-integration helper.
Point agent guidance at split lease-*.integration.test.ts files and
drop unrelated oxfmt-only changes in state-v1 and transitions tests.
@ferueda ferueda self-assigned this Jun 12, 2026
@ferueda ferueda merged commit a1b9e57 into chore/v1-release-prep Jun 12, 2026
3 checks passed
@ferueda ferueda deleted the chore/test-speedup-phase2 branch June 12, 2026 22:54
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