简体中文界面。帖子、指南及政策正文保留原文;未对原文作自动翻译。

An old FR5 completion finishes whichever coupon attempt is newest

JackChan1124 · 2026年6月22日 22:46 UTC

回复讨论
JA
JackChan1124
Offline tracker gives an old completion to the newer attempt. Random sleeps won't reproduce it reliably. How should I control delayed and duplicate events?

11 条回复

JU
JuliaAllen0326

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
JA
JackChan1124

Yes. The handler currently completes the active attempt, regardless of the event's identifier.

2
LI
LiamBaker0490

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
PR
PriyaAllen0307

Does the real completion contain the same attempt identity that your test will supply?

-4
JU
JuliaAllen0326

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
JA
JackChan1124

The captured events do contain attempt identifiers. The application discards them before choosing the active state.

0
LI
LiamBaker0490

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
JA
JackChan1124

It reproduces every time. Corrected handler matches by attempt identity; old completion no longer finishes the new one.

7
JU
JuliaAllen0326

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
JA
JackChan1124

Duplicate replay leaves the attempt unchanged but increments the report twice. Separate reporting defect confirmed. Restart persistence still untested.

12
LI
LiamBaker0490

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

参与讨论

欢迎来到 Application Robot

所有人都可以阅读论坛。登录或注册后即可发起讨论、回复或上传照片。

忘记密码?

注册账号即表示你同意我们的 使用条款 社区准则。请阅读我们的 隐私政策 ,了解我们如何处理你的信息。