Repository navigation
Commit 4c1d62e
test: stop two tests failing on timing and megapixels (#1526)
Both of these blocked unrelated PRs today and neither is auto-retryable:
#1419's contention retry declines find.test.ts as outside its enumerated
list, and slow-gate failures cannot be re-checked by a rerun. Each
occurrence costs a manual re-run.
find.test.ts 'wait captures fresh snapshots while polling' asserted exactly
2 dispatches. The wait loop polls at a 300ms interval against a 350ms
budget, and its last sleep consumes whatever remains, so it lands exactly on
remainingMs() === 0 — a sleep returning a millisecond early admits a third
poll. The count was never assertable. The test's actual subject is that each
poll re-captures instead of reusing the first tree, so it now asserts that:
at least two captures, every one a snapshot.
The sibling assertion at the top of the file is left alone: it takes its
count from mockResolvedValueOnce ordering, not from the clock.
apps.test.ts built 1206x2622 (iPhone 16 Pro, 3.2 megapixels) source PNGs to
prove two rescale ratios. Both sources are now 126x273 — still divisible by
3, so the /3 and 2/3 arithmetic stays exact — with expectations updated to
match. Measured on this machine: the density test 1021ms -> 34ms, the retry
test 1176ms -> 233ms, the file's test time 2.48s -> 1.00s.
Both suites pass: 18/18 find, 54/54 apps.
Claude-Session: https://claude.ai/code/session_01RXQLYV7etZx3gcXsUsrQJ8
Co-authored-by: Claude <[email protected]>1 parent 2e0ed0a commit 4c1d62e
2 files changed
Lines changed: 21 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
751 | 751 | | |
752 | 752 | | |
753 | 753 | | |
754 | | - | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
755 | 761 | | |
756 | 762 | | |
757 | 763 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
| |||
205 | 209 | | |
206 | 210 | | |
207 | 211 | | |
208 | | - | |
209 | | - | |
| 212 | + | |
| 213 | + | |
210 | 214 | | |
211 | 215 | | |
212 | 216 | | |
| |||
246 | 250 | | |
247 | 251 | | |
248 | 252 | | |
249 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
250 | 258 | | |
251 | 259 | | |
252 | 260 | | |
| |||
279 | 287 | | |
280 | 288 | | |
281 | 289 | | |
282 | | - | |
283 | | - | |
| 290 | + | |
| 291 | + | |
284 | 292 | | |
285 | 293 | | |
286 | 294 | | |
| |||
0 commit comments