Repository navigation
Commit 6cc43c9
test(mobile): report host hop latency when a push snapshot callback times out
Follow-up to 885804282 from its review. That commit added a class-level
`BuzzTestHostSettleBarrier` that measured a user-initiated-queue-then-main
hop in `setUp` and let the class start once three consecutive hops were
fast. Re-reading both 2026-11-01 CI logs showed the barrier would have
opened immediately in both failing runs: in job 124905175903 the one-hop
test `testAllowedNotificationRestoreNeedsNoAppGroupStore` passed in
0.070 s at the start of the class, and in job 124910378184 the gate would
have opened in the 1-2 s lull after its 1.287 s hop. Both stalls began
mid-class and recurred mid-test, which a one-instant gate cannot cover,
and a sustained-hop version would be a CI-only wait. The barrier, its
doc comment with the measurement figures, and its "settled/gave up" print
are removed. The per-element QoS assertion from 885804282 and everything
from f0bf2c0c8 stay.
In its place, a `waitForCallback` helper in `BuzzPushSnapshotEnrichmentTests`
wraps the three callback waits in the two affected tests. It waits with
`XCTWaiter` for the unchanged 10 s `callbackTimeout` and returns at once on
success, costing nothing on a passing run. Only when the wait does not
complete does it time one fresh user-initiated-queue-then-main-queue hop,
the path every bridge reply follows, bounded at 2 s, and fail with the
expectation's description plus the measured hop ("a fresh queue->main hop
took 705.3 ms", "took 0.4 ms", or "did not finish within 2 s"). That lets a
starved host be told apart from a callback that never fired the next time
this appears in CI. The original assertions still run after the helper, so
the nil-versus-reason evidence is unchanged.
If this recurs, the remaining levers are the test host (RunnerTests boot
the full Flutter app as TEST_HOST, which is what saturated the 3-vCPU
runner) or the 10 s `callbackTimeout`.
Verification (Xcode 27.2, iOS 26.2 simulator runtime, 16-core host):
- Forced timeout, with temporary variants not committed: making the
bridge's retry deletion never call back produced "'retry failure stays
allowed' not fulfilled within 10 s; a fresh queue->main hop took 0.4 ms"
followed by the existing nil-versus-reason assertion failure; adding a
0.7 s sleep inside the hop produced "took 705.3 ms".
- Class in isolation with the final code: 10/10 green, 0.1-0.5 s each.
- Full RunnerTests bundle with CI's `-parallel-testing-enabled NO`: 2/2
green (101 tests, 24-29 s).
- The commit touches only this test file; the pinned Dart formatter was
first on PATH so the pre-commit hook reformatted nothing else. No
swiftformat or swiftlint configuration in the repo; `git diff --check`
is clean.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Matt Toohey <[email protected]>1 parent ff19edf commit 6cc43c9
1 file changed
Lines changed: 27 additions & 52 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | 245 | | |
292 | 246 | | |
293 | 247 | | |
294 | 248 | | |
295 | 249 | | |
296 | 250 | | |
297 | | - | |
298 | | - | |
299 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
300 | 275 | | |
301 | 276 | | |
302 | 277 | | |
| |||
406 | 381 | | |
407 | 382 | | |
408 | 383 | | |
409 | | - | |
| 384 | + | |
410 | 385 | | |
411 | 386 | | |
412 | 387 | | |
| |||
419 | 394 | | |
420 | 395 | | |
421 | 396 | | |
422 | | - | |
| 397 | + | |
423 | 398 | | |
424 | 399 | | |
425 | 400 | | |
| |||
459 | 434 | | |
460 | 435 | | |
461 | 436 | | |
462 | | - | |
| 437 | + | |
463 | 438 | | |
464 | 439 | | |
465 | 440 | | |
| |||
0 commit comments