Hi,
I'm wondering whether there exists functionality to keep retrying the test under certain condition. This is especially relevant for APIs with long running 'asynchronous' tasks, i.e., consider the following endpoints:
/create endpoint that accepts the task and immediately yields a 200 status
/status endpoint that returns the status of the job, e.g., IN_PROGRESS, SUCCESS and FAILED
I'd like to express a test that keeps re-trying the /status endpoint until the status is either SUCCESS or FAILED. This could indeed be achieved with the retry functionality, but that would result in a rather flaky test as the duration of the task varies heavily.
P.S. Happy to contribute after discussion.
Hi,
I'm wondering whether there exists functionality to keep retrying the test under certain condition. This is especially relevant for APIs with long running 'asynchronous' tasks, i.e., consider the following endpoints:
/createendpoint that accepts the task and immediately yields a 200 status/statusendpoint that returns the status of the job, e.g.,IN_PROGRESS,SUCCESSandFAILEDI'd like to express a test that keeps re-trying the
/statusendpoint until the status is eitherSUCCESSorFAILED. This could indeed be achieved with theretryfunctionality, but that would result in a rather flaky test as the duration of the task varies heavily.P.S. Happy to contribute after discussion.