Why does yesterday's test result finish the attempt I just started?
DominicBailey · 24 Sept 2025, 04:39 UTC
21 replies
Can your test choose when each message is delivered?
23pointsAt the moment a background thread sleeps and sends it, so the machine running the test gets a vote in the order
8pointsReplace that timing guess with an event queue the test advances explicitly.
16pointsWrite down the bad sequence in the test itself. Old attempt waits, new attempt starts, old completion arrives. Then check the new attempt is still unfinished, not just that the test printed the right warning.
15pointsDoes the completion carry an attempt identity?
15pointsOnly the job label in my model, which is exactly what gets reused; the software owner is reviewing how the real interface can carry attempt identity
17pointsKeep the reused label in the test. It is part of the failure case.
22pointsCan you reproduce it now without any sleeps?
6pointsYes, Liam, queued delivery fails the old handler every time I've run it, and Daniel's unfinished-state assertion catches the wrong completion directly
20pointsGive the test separate identities for separate attempts. Deliver duplicates as well as the delayed event, and check that a completed attempt cannot be credited twice. Keep the real interface work separate from this model change.
18pointsAdded unique attempt identities in the model and the delayed case now passes, but a duplicate still adds another entry to the completion list
2pointsThere's your next assertion. One accepted completion entry per attempt. I'd also want the ignored duplicate visible somewhere for diagnosis, because otherwise support will wonder why the raw message count differs.
15pointsThe model now retains the duplicate as an event without crediting another completion; or rather, that's what the new handler does, and the old handler fails both checks
19pointsWhat happens if the application restarts before the duplicate arrives?
23pointsAnd does the test restore saved state or start empty?
14pointsRestore the state the application design actually persists. Include a crash after receipt but before saving the completion. Recovery has to handle that uncertainty rather than assuming the event never occurred.
23pointsLiam, it started empty, which was no help; I've added saved-state restoration and a crash point before the save, Elliot, with the unresolved case left for reconciliation
7pointsAlso deliver the new attempt's valid completion before the old one. The old event must not overwrite the newer result or reopen a completed attempt.
19pointsWho will read the unresolved case screen? Your software owner should try the wording with them. 'Unknown' without the attempt or reason sends people straight back to asking you.
22pointsQuality's shift lead will review that screen, Daniel; model tests now cover both completion orders, duplicates and the save gap, but the live interface proposal is still with its owners
11pointsDiscussion closed
This discussion is closed to new replies after six months without activity. Last activity: .