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.
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.
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.