An old FR5 completion finishes whichever coupon attempt is newest
JackChan1124 · 2026年6月22日 22:46 UTC
主帖中文翻译暂不可用,以下显示英文原文;回复保留原文。 查看英文原文
11 条回复
Can the test inject a chosen event at a chosen state transition? Start the first attempt, retain its completion, start the next through the permitted test sequence, then deliver the old event while the new attempt remains pending. Assert both states before proceeding. That is a defined ordering, not a race you hope to win by sleeping longer.
16分Yes. The handler currently completes the active attempt, regardless of the event's identifier.
2分Then reproduce that exact error first. Also record what should happen to the old attempt; leaving the new one alone is only half the expected result.
22分Does the real completion contain the same attempt identity that your test will supply?
-4分Priya's question protects the test from inventing a better interface than the real one. If the identity is absent or ambiguous, the expected behaviour should preserve that uncertainty rather than let the test helper assign it using knowledge the application cannot have.
11分The captured events do contain attempt identifiers. The application discards them before choosing the active state.
0分Jack, has the deterministic sequence reproduced the original failure now? Interested in that before the duplicate and restart cases make the test harder to read.
22分It reproduces every time. Corrected handler matches by attempt identity; old completion no longer finishes the new one.
7分Now deliver a matched completion twice and check the report as well as the attempt state. Also deliver the old result after the newer attempt legitimately finishes. A state machine can look correct while a summary counter still treats every delivered event as another completed coupon.
13分Duplicate replay leaves the attempt unchanged but increments the report twice. Separate reporting defect confirmed. Restart persistence still untested.
12分Worth finding. Keep the two reproduced failures separate so the reporting fix cannot hide a tracker regression. You have a useful test sequence, not a completed reconciliation fix yet.
16分