Reproducing delayed events without random sleeps (Universal Robots UR5e, inspection-cycle tracking)

BrunoBrooks0800 · 3 May 2026, 17:50 UTC

Reply to discussion
BR
BrunoBrooks0800
In our offline test, delivering an old completion after a new attempt starts makes the new inspection-cycle tracking attempt look complete. The real setup uses Universal Robots UR5e in a bench cell preparing for commissioning, with a sample bracket as a reference. I'm trying to exercise delayed and duplicate events reliably; random sleeps keep making the test hard to reproduce.

15 replies

RE
ReeceBaker0471
Replying to BrunoBrooks0800

Save the exact event order. Does your handler match the completion by attempt identity, or just the job label?

10 points
BR
BrunoBrooks0800
Replying to ReeceBaker0471

Just the job label. I've saved the sequence: earlier completion arrives after the new attempt starts. It reproduces the wrong match.

14 points
RE
ReeceBaker0471
Replying to BrunoBrooks0800

Use the saved sequence to exercise matching by attempt identity, with a controllable harness clock. Making the ordering deterministic should cover this race condition

24 points
CA
CallumBarnes0534
Replying to ReeceBaker0471

It covers that order, not every race. A duplicate or a timeout followed by a late acknowledgement is a different sequence.

0 points
RE
ReeceBaker0471
Replying to CallumBarnes0534

@CallumBarnes0534 Fair. I meant this reproduced wrong match, not the whole class. Keep it as one named schedule and add duplicates and timeout-then-acknowledgement separately

25 points
BR
BrunoBrooks0800
Replying to ReeceBaker0471

@ReeceBaker0471 For a duplicate, should our history keep both observations even if the completed count only changes once?

20 points
RE
ReeceBaker0471
Replying to BrunoBrooks0800

Yes. Record the second observation as a duplicate without applying completion again. You want repeat delivery to leave the accepted result unchanged

8 points
CA
CalebChan1102
Replying to ReeceBaker0471

Idempotent means ignoring it, basically? Or am I missing why you'd log something you ignored?

18 points
RE
ReeceBaker0471
Replying to CalebChan1102

Same effect when applied again. You can observe and log the duplicate without repeating its business effect; those are different actions

11 points
JO
JonasAllen0285
Replying to ReeceBaker0471

@ReeceBaker0471 On my setup, checking the final count alone let a repeated notification slip through. The stored number was correct even though another visible effect happened twice.

11 points
BR
BrunoBrooks0800
Replying to JonasAllen0285

Our schedule assertions will include notifications as well as counts, since an unchanged number wouldn't reveal a duplicate message being emitted.

23 points
CA
CallumBarnes0534
Replying to BrunoBrooks0800

And the timeout case? Waiting too long doesn't tell you whether the remote job completed.

19 points
BR
BrunoBrooks0800
Replying to CallumBarnes0534

@CallumBarnes0534 Unknown until matching evidence settles it. I don't want our harness teaching the application that timeout means safe to retry.

4 points
BR
BrunoBrooks0800
Replying to BrunoBrooks0800

I've got a repeatable route for this bug: replay the saved sequence against attempt-specific matching. I'll call the fix complete only when the wrong attempt stays untouched and the related duplicate and timeout cases pass.

14 points
RE
ReeceBaker0471
Replying to BrunoBrooks0800

That gives the original mismatch a concrete test while keeping completion dependent on the related cases too

11 points

Add to the discussion

Welcome to Application Robot

Everyone can read the forum. Sign in or create an account to start a discussion, reply, or upload photos.

Forgot your password?

By creating an account, you agree to our Terms and Conditions and community guidelines. Read our Privacy Policy for how your information is handled.