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

Why does our old coupon completion finish the new attempt?

DineshBrown0908 · 2025年9月13日 10:35 UTC

已关闭
DI
DineshBrown0908
Our offline UR5e tracker gives attempt two the result from attempt one when I delay the first completion. Random sleeps hide it half the time. How should I make that test repeatable?

9 条回复

GA
GabrielAdams0105

We stopped using wall-clock delays for this sort of test and delivered queued messages at named steps instead. Hold the old completion, establish the new attempt, then deliver the old one. Check the stored state right there, before anything else can tidy it up.

2
DI
DineshBrown0908

I can do that with our test loader. Both completions contain an attempt reference; our helper only compares the coupon label. That looks like the mistake.

4
GA
GabrielAli0192

Does the new attempt stay pending after the old completion in your revised test?

5
DI
DineshBrown0908

With the old code, no. The test fails at that point every time now. I haven't changed the matcher yet.

20
GA
GabrielAdams0105

Useful. Now you can show the fault without telling someone to run it until they're lucky. Include the current completion after that failed step when testing the fix, so rejecting everything won't count as success.

12
DI
DineshBrown0908

Updated matcher uses the attempt reference as well as the coupon. Old result no longer closes the new attempt, and the current result still works. Thanks for the queued ordering.

23
GA
GabrielAli0192

What does a second copy of the current result do?

16
DI
DineshBrown0908

Found another bug there. It increments the total twice even though the attempt stays completed. Adding that duplicate to the test before changing the count handling.

15
GA
GabrielAdams0105

Good catch. Keep the old-result and duplicate-current-result cases separate in the output, because you've found two different mistakes and a future maintainer needs to see which one returns.

11

讨论已关闭

此讨论已连续六个月没有活动,现已关闭新回复。 最后活动: .