Definition

Idempotency

What does idempotency mean when testing a retry?

An operation is idempotent when carrying it out more than once has the same intended effect as carrying it out once. In a retry test, deliver the same logical operation again and inspect the final business state and the side effects covered by that guarantee.

How do you distinguish a retry from a second request?

Follow the product’s rule for identifying a logical operation, often a stable event ID or idempotency key. Two genuinely separate requests can contain identical values. Check that reusing the original identity preserves one effect and that a new identity can produce a second effect when appropriate.

Worked example

One delivery confirmation after a repeated message

A queue delivers the same parcel-arrived event twice. If the service promises one customer notification per event, look for one notification and one arrival record after both deliveries. An acknowledgement for each delivery alone leaves the customer-facing result unknown.

Try it on your pull request

Choose a change in your repository and tell Cue April what should happen. Review the proposed checks before they run.

Try Cue April on your repository