test: run jest in one process, fail on an open handle (closes #766)
Jest force-stopped worker processes that could not exit within 500 ms on a starved CPU, failing runs where every test passed. The test scripts now pass --runInBand. script/lib/jest.js fails the run at once when jest warns that it did not exit one second after the run, instead of hanging. The Dockerfile test stage drops its 90-second timeout. tests/jestRunner.test.js runs the runner on a fixture that leaves an interval running and expects exit status 1. Model: opus-5-5
This commit is contained in:
1 parent
d909567ab9
commit
4cb61d1a10
7 files changed
+72
-39
No files matched your search
+4
-5
@@ -18,9 +18,8 @@ COPY . .
|
||||
RUN yarn run lint
|
||||
RUN script/check-censored
|
||||
|
||||
# Test phase, same shape and for the same reason: the jest suite (its worker
|
||||
# cap is in package.json), rerun verbose on failure, then
|
||||
# script/test-verify-build.
|
||||
# Test phase, same shape and for the same reason: the jest suite, rerun
|
||||
# verbose on failure, then script/test-verify-build.
|
||||
#
|
||||
# node:22-slim (22.x LTS), 2026-02-24
|
||||
FROM node@sha256:5373f1906319b3a1f291da5d102f4ce5c77ccbe29eb637f072b6c7b70443fc36 AS test
|
||||
@@ -33,9 +32,9 @@ RUN script/bootstrap
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN timeout 90 yarn run test || \
|
||||
RUN yarn run test || \
|
||||
{ echo "--- Rerunning with --verbose for details ---"; \
|
||||
timeout 90 yarn run test:verbose; exit 1; }
|
||||
yarn run test:verbose; exit 1; }
|
||||
RUN script/test-verify-build
|
||||
|
||||
# Development environment with the extension built, and the last stage: a
|
||||
|
||||
Reference in new issue
Block a user