How do you test an API that accepts work now and completes it later?
Answer
Verify acceptance semantics and correlation IDs, then observe status resources, callbacks, queues or events until a defined terminal outcome. Cover duplicate submissions, retries, timeouts, ordering, partial failure and eventual consistency without fixed sleeps.
Strong answer includes
- correlation and terminal states
- eventual consistency
- retries and idempotency
Practical example
A tester submits a report-generation request, gets back a job ID and a 202, then polls the status endpoint with exponential backoff instead of a fixed sleep, and separately submits the same request twice with the same idempotency key to confirm only one report is actually generated.