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
On Windows, the device lock fails while another run deletes a lock file #218
Windows reports a file that another process is deleting as EPERM rather than ENOENT until the deletion completes: reading a file in a create/delete loop on Windows 11 gave 160 EPERM among 7,126 reads. The device lock (packages/jest/src/resource-lock.ts) reads its owner and queue files while other runs delete them, and treats only ENOENT as absent, so:
a run waiting for a device can fail with EPERM: operation not permitted, open '…\owner.json' when the holder releases it;
the heartbeat's read of owner.json sits outside the catch that makes a failed refresh harmless, and rejects unhandled. Under load, resource-lock.test.ts reports it three times:
Unhandled Rejection
Error: EPERM: operation not permitted, open '…\react-native-harness-resource-lock-test-…\owner.json'
Separately, on every platform release does not wait for a heartbeat refresh in progress. A refresh that has passed its check writes owner.json back after release removed it, so the next run in the process waits for the lock to go stale.
I have a fix for the three. I can open a PR.
System Info
System:
OS: Windows 11 10.0.26200
Binaries:
Node: 26.8.1
Activity
fix(jest): tolerate transient Windows EPERM in resource lock and awai…