Commit 7cbab59
fix(test): make GET /api/sessions/:id/files error-path test deterministic (#241)
Race condition fix surfaced by the post-merge CI on dc8a4a5: macOS
arm64 Node 24 lost the race between fs.rmSync and the PTY exit callback,
so the session was removed from the Map before the GET landed and we got
404 instead of the 500 the route returns when readdirSync fails.
Switching from rm to rename keeps the inode alive (PTY happy) while
still making the path-based readdir fail. 1199/1199 tests still pass
locally.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent dc8a4a5 commit 7cbab59
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4216 | 4216 | | |
4217 | 4217 | | |
4218 | 4218 | | |
| 4219 | + | |
4219 | 4220 | | |
4220 | 4221 | | |
4221 | 4222 | | |
4222 | 4223 | | |
4223 | 4224 | | |
| 4225 | + | |
4224 | 4226 | | |
4225 | 4227 | | |
4226 | 4228 | | |
| |||
4239 | 4241 | | |
4240 | 4242 | | |
4241 | 4243 | | |
4242 | | - | |
| 4244 | + | |
| 4245 | + | |
| 4246 | + | |
| 4247 | + | |
| 4248 | + | |
| 4249 | + | |
| 4250 | + | |
4243 | 4251 | | |
4244 | 4252 | | |
4245 | 4253 | | |
| |||
0 commit comments