Repository navigation
Commit 7f600ee
committed
test(utils)(#1918 u159): inject the interruption fault at the resolved commit destination
The windows arm of platform-unit-test still fails at ca208a2, and its log names twelve rows in
utils/__tests__/safeWriteJson.interruption.test.ts: `expected 'WRITE_COMPLETED\n' to contain
'EXIT_AT_REPLACEMENT_RENAME'` at line 187. The child's seam decides which rename is the commit step
by comparing the rename's destination with `path.resolve(INTERRUPTION_TARGET_PATH)`, while the
writer now commits to the path it resolved. On the hosted runner the temporary root arrives in its
8.3 short form, so the two spellings name the same directory differently, the seam never fires, and
the child completes the write instead of dying at the rename.
The seam resolves the destination the way the writer resolves its own destination - canonicalize
the parent directory with realpathSync.native and re-join the basename - and compares that with the
same resolution of the target, falling back to the handed spelling where the path is not there yet.
Inside CHILD_SCRIPT that is 13 comment lines and 10 executable lines added and 1 executable line
replaced; the outer TypeScript statement is unchanged and nothing outside __tests__ moved.1 parent ca208a2 commit 7f600ee
1 file changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
38 | 60 | | |
39 | 61 | | |
40 | | - | |
| 62 | + | |
41 | 63 | | |
42 | 64 | | |
43 | 65 | | |
| |||
0 commit comments