Repository navigation
Commit 3d1e4ec
committed
fix(tests): await the lock holder before removing its temp root
The contention test released its holder and dropped the exit promise on the floor,
so afterEach could remove the temp root while that child still had the coordinator
database open. Windows refuses to unlink a file another process holds, so teardown
threw EBUSY and the failure was attributed to a test that had already proved its
assertion. POSIX unlinks an open file regardless, which is why this only ever
appeared on Windows, and only under full-suite load where the child exits slower.
Await the holder, and let teardown retry briefly before giving the directory back
to the OS: `force` covers a missing path, not a locked one, and a temp directory
left behind is a smaller lie than a green test reported red.1 parent 4309560 commit 3d1e4ec
1 file changed
Lines changed: 24 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
54 | 70 | | |
55 | 71 | | |
56 | 72 | | |
| |||
98 | 114 | | |
99 | 115 | | |
100 | 116 | | |
101 | | - | |
| 117 | + | |
102 | 118 | | |
103 | 119 | | |
104 | 120 | | |
| |||
130 | 146 | | |
131 | 147 | | |
132 | 148 | | |
133 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
134 | 155 | | |
135 | 156 | | |
136 | 157 | | |
| |||
0 commit comments