my test passes because the old result arrives too early

WillBrown0922 · 2026年9月4日 10:22 UTC

回复讨论

主帖中文翻译暂不可用,以下显示英文原文;回复保留原文。 查看英文原文

WI
WillBrown0922
I'm testing sample bookkeeping offline before our UR5e bench cell is commissioned. A delayed result can complete the next attempt for the same housing, but my random sleeps usually deliver it before the retry exists. I'd like explicit event-order tests; actually, I'd like to stop timing luck deciding whether this bug appears fixed.

2 条回复

EM
EmilWorkcell_cce311

I would write one test where attempt A is still pending, attempt B is created, then A's result arrives. The result should carry the attempt identity, not just the housing identity. Otherwise the delay is still doing the matching for you.

0分
WI
WillBrown0922

That is the key question. When a result has no live matching attempt, is it held for review, discarded, or allowed to complete something newer? Make the expected outcome explicit for each case before checking the implementation.

0分

参与讨论

欢迎来到 Application Robot

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

忘记密码?

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