Repository navigation
Commit 6aed302
committed
test(file-safety): pin the durability wrapper's cause and the exact staging release
Review follow-ups on the durability regression coverage:
- the injected fsync failure now targets a REAL directory descriptor
(safeWriteText closes it in its finally block; a fabricated fd made
closeSync fail with EBADF behind the same wrapper, so the test could
pass without confirming its stated cause), and the test asserts the
PostCommitDurabilityError carries the injected EIO error as its
cause.
- the staging-release assertions compare the exact directory path read
back from the create instead of a substring, so a release aimed at a
different staging directory no longer passes. Mutation check:
releasing stagingDir + "_other" reddens the strengthened tests.1 parent b890914 commit 6aed302
2 files changed
Lines changed: 26 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
169 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
170 | 171 | | |
171 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
172 | 175 | | |
173 | 176 | | |
174 | 177 | | |
| |||
184 | 187 | | |
185 | 188 | | |
186 | 189 | | |
187 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
188 | 193 | | |
189 | 194 | | |
190 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1108 | 1108 | | |
1109 | 1109 | | |
1110 | 1110 | | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
1114 | 1117 | | |
1115 | 1118 | | |
1116 | 1119 | | |
1117 | | - | |
| 1120 | + | |
| 1121 | + | |
1118 | 1122 | | |
1119 | 1123 | | |
1120 | 1124 | | |
1121 | 1125 | | |
1122 | | - | |
1123 | | - | |
| 1126 | + | |
| 1127 | + | |
1124 | 1128 | | |
1125 | 1129 | | |
1126 | 1130 | | |
1127 | 1131 | | |
1128 | 1132 | | |
1129 | 1133 | | |
1130 | 1134 | | |
1131 | | - | |
1132 | | - | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
1133 | 1138 | | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
1134 | 1142 | | |
1135 | 1143 | | |
1136 | 1144 | | |
| |||
0 commit comments