fix(test): Docker skip guards + flaky test stabilization (#677)#857
fix(test): Docker skip guards + flaky test stabilization (#677)#857
Conversation
🟢 Impact Analysis — PR #857Risk tier: 🟢 LOW 📊 Summary
🎯 Risk Factors
📦 Modules Affectedtests (4 files)
This report is generated automatically for every PR. See #733 for details. |
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 2 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ❌ | Branch up to date | dev is 3 commit(s) ahead — rebase recommended |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | No source files changed — changeset not required |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ❌ | Copilot threads resolved | 1 unresolved Copilot thread(s) — fix and resolve before merging |
| ❌ | CI passing | 16 check(s) still running |
Files Changed (4 files, +73 −30)
| File | +/− |
|---|---|
test/aspire-integration.test.ts |
+12 −21 |
test/cli/aspire.test.ts |
+25 −8 |
test/helpers/skip-guards.ts |
+35 −0 |
test/template-sync.test.ts |
+1 −1 |
Total: +73 −30
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
There was a problem hiding this comment.
Pull request overview
This PR cherry-picks the fix from #723 to make Docker-dependent tests skip gracefully when Docker is unavailable (or explicitly disabled) and to reduce flakiness in template sync tests under load.
Changes:
- Introduces a shared Docker skip-guard helper (
dockerSkipReason()) for test suites. - Refactors Aspire integration and CLI Aspire tests to use
describe.skipIf(...)with the shared helper. - Increases the
sync-templates.mjsexecution test timeout to improve stability.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| test/helpers/skip-guards.ts | Adds shared Docker availability detection and skip-reason helper for tests. |
| test/aspire-integration.test.ts | Replaces inline Docker detection with the shared dockerSkipReason() guard. |
| test/cli/aspire.test.ts | Wraps Docker availability describe block in a describe.skipIf(...) guard using the shared helper. |
| test/template-sync.test.ts | Raises exec timeout from 30s to 60s to reduce flakiness under load. |
b3fc085 to
41a93ad
Compare
63a9c03 to
a82b185
Compare
- Add shared skip-guards.ts with isDockerAvailable() and dockerSkipReason() - Split Docker-present tests from mocked tests so mocked tests always run - Guard signal handlers behind SKIP_REASON check - Stabilize flaky tests with proper cleanup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
a82b185 to
0e922bc
Compare
tamirdresher
left a comment
There was a problem hiding this comment.
Approved by @tamirdresher — reviewed diff, CI green, changes are clean and well-tested. cc @diberry
- Add shared skip-guards.ts with isDockerAvailable() and dockerSkipReason() - Split Docker-present tests from mocked tests so mocked tests always run - Guard signal handlers behind SKIP_REASON check - Stabilize flaky tests with proper cleanup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Closed by #theSquadsquad triage — verified fixed in v0.9.4. |
Cherry-picks the fix from #723. Adds shared Docker skip guard helper and stabilizes flaky tests.
Changes
Testing
Original author: @tamirdresher
Closes #677, fixes #582
Part of stale PR triage (diberry#137)