From 7dcb0bf95baec8b1c29da451e3096404e3d4be84 Mon Sep 17 00:00:00 2001 From: lobo Date: Sun, 1 Nov 2026 12:21:34 +0100 Subject: [PATCH] Fixed problems --- ROADMAP.md | 2 +- src/app/pages/algorithms/cloth-icm/cloth-icm-solver.spec.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 7eef737..99d7287 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -15,7 +15,7 @@ Open ideas for the playground frontend. Tick a box when done. ## Tests - [ ] `seo.service.ts`: spec for title/meta update on route change and language change. -- [ ] **Cloth ICM drop specs near timeout**: drop specs in `cloth-icm-solver.spec.ts` take 2.5-3 s each vs Vitest's 5 s default; give them an explicit timeout before a slow CI runner fails them. +- [x] **Cloth ICM drop specs near timeout**: drop specs in `cloth-icm-solver.spec.ts` take 2.5-3 s each vs Vitest's 5 s default; give them an explicit timeout before a slow CI runner fails them. - [ ] Pure logic without specs: `pathfinding-animator.ts`, cloth and pendulum GPU strategies (the math around them, not the shaders), `fractal3d`. ## Features diff --git a/src/app/pages/algorithms/cloth-icm/cloth-icm-solver.spec.ts b/src/app/pages/algorithms/cloth-icm/cloth-icm-solver.spec.ts index abcfca4..4aaead6 100644 --- a/src/app/pages/algorithms/cloth-icm/cloth-icm-solver.spec.ts +++ b/src/app/pages/algorithms/cloth-icm/cloth-icm-solver.spec.ts @@ -3,6 +3,8 @@ import {ClothIcmSolver} from './cloth-icm-solver'; const DT = 1 / 60; const TANGLED_SPACING = 0.1; +// The simulation specs take 2-7 s on a slow CI runner; Vitest's default is 5 s. +const SPEC_TIMEOUT_MS = 30_000; function config( gridSize: number, thickness = 0.01, proximityRedetectEvery = 0, spacing = TANGLED_SPACING, velocitySmoothing = 0, clampProximityVelocity = false @@ -64,7 +66,7 @@ function runFrames(solver: ClothIcmSolver, frames: number, icmStep: number, dt: return solver.stats.intersections; } -describe('ClothIcmSolver', () => { +describe('ClothIcmSolver', {timeout: SPEC_TIMEOUT_MS}, () => { it('untangles the tangled scene with ICM on', () => { const {solver, firstContours} = run('tangled', 30, 150, true); expect(firstContours).toBeGreaterThan(0);