You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In-memory MongoDB crashes with SIGSEGV intermittently in apps/api/test/app.test.ts and fails the coverage gate #1906
In one of four local pnpm test:coverage runs, the in-memory MongoDB process crashed while apps/api/test/app.test.ts started. The test file did not run, so coverage fell below 100% and the run failed. The same tree passed in the other three runs, and apps/api/test/app.test.ts passed 2 of 2 times when run alone.
Output
[Nest] ERROR [ExceptionHandler] UnexpectedCloseError: Instance closed unexpectedly with code "null" and signal "SIGSEGV"
at MongoInstance.closeHandler (.../mongodb-memory-server-core@11.3.0/.../lib/util/MongoInstance.js:335:58)
Error: [vitest-pool]: Worker forks emitted error.
Caused by: Error: Worker exited unexpectedly with signal SIGABRT during started state while running test file apps/api/test/app.test.ts
Test Files 452 passed (453)
ERROR: Coverage for lines (99.94%) does not meet global threshold (100%)
The files reported as not covered were assignments.module.ts, auth.module.ts, jwt.strategy.ts and gateway.module.ts, which only that test file loads.
I do not have a core dump or the mongod log, so the cause of the SIGSEGV is not known. It can be specific to this kernel or distribution.
I saw it one time. It occurred when the full suite ran in parallel, not when the file ran alone.
One crash of the database makes the full coverage gate fail with a message about coverage, which hides the cause. If this occurs on other machines, a retry of the instance start can be worth adding.
Activity