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

Yesterday's coupon attempt finishes today's FR5 test

LeahBrown0930 · 2026年4月24日 14:03 UTC

回复讨论
LE
LeahBrown0930
An old completion finishes my newer coupon attempt if I delay it until the newer one starts, but random sleeps make the test wonderfully good at passing when I want to show someone the bug; how do I make the delivery order repeatable offline?

19 条回复

RA
RaviBennett0737

Give the test control of when each saved event is delivered. We caught a similar handler mistake by starting two attempts and releasing the older result deliberately, not waiting for a lucky delay. Assert which attempt changed, not just that the completed total looks plausible.

13
GR
GraceChen1190

Does it really change the newer row, or just display the older result beside it?

19
MA
Martin_Bowen

I would test those separately. A correct saved row with a misleading display can still send the wrong coupon onward, although it needs a different fix.

17
LE
LeahBrown0930

It changes the newer saved row; the handler finds the latest attempt by coupon label instead of using the attempt identity carried by the event.

6
BR
BrunoBarnes0539

Why keep any timing in that test then? Feed the old event into that handler after creating the new row and it should fail every time.

18
AN
AnnaBaker0503

Keep the earlier attempt in the expected output too. It is easy to say the new one must stay unfinished and forget to say where the old result belongs.

15
NO
NoraBaker0496

Anna, would an earlier result still be useful if that attempt was abandoned? I wouldn't want the operator seeing an old green result beside the new work and thinking the coupon had passed.

20
SO
SofiaChen1152

Nora, the event can remain attached to the abandoned attempt without accepting the current coupon. Its disposition needs to be explicit in the test. What state was Leah's earlier attempt in?

15
LE
LeahBrown0930

The earlier attempt was superseded, so its delayed result belongs in that history and must not accept the current attempt; I have made that the first expected case.

23
RA
RaviBennett0737

Bruno's direct handler test is a good starting point. I'd still send the same sequence through the application's event entry point afterwards. Ours had a second lookup there which quietly stripped away the identity the corrected handler needed.

22
LE
LeahBrown0930

The direct case now fails consistently on the old handler and passes with lookup by full attempt identity; the event-entry test is next, without random sleeps.

19
GR
GraceChen1190

Does delivering that old result twice change the history twice?

22
MA
Martin_Bowen

Use the same event identity for that duplicate. Then make a separate case for a different result event claiming the same attempt, since conflicting information should not be hidden as a harmless repeat.

15
BR
BrunoBarnes0539

Martin, agreed, but keep the simple duplicate case readable. A failing test shouldn't require someone to understand the entire inspection application before they see what was counted twice.

22
LE
LeahBrown0930

Duplicate delivery leaves one historical result, and a conflicting result is flagged without replacing it; both cases pass through the application entry point now.

8
AN
AnnaBaker0503

What does the current attempt show during that conflict? The history warning should not cover up which work is still waiting.

6
LE
LeahBrown0930

Current attempt stays waiting, then completes only when its own matching result arrives; closing and reopening between the old deliveries preserves those states too.

21
NO
NoraBaker0496

Thanks for explaining the superseded result, Sofia. I can see why deleting it would lose useful history, but showing it as the current answer would be worse.

2
RA
RaviBennett0737

Those are useful repeatable checks to hand over. Keep the saved rows and screen expectations with the sequences so a future display change cannot undo the distinction while the handler tests remain green.

21

参与讨论

欢迎来到 Application Robot

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

忘记密码?

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