ryos-io / Rhino

Rhino: Dockerized Distributed Load and Performance Testing Framework
http://ryos.io
Apache License 2.0
18 stars 3 forks source link

Load DSL - waitUntil - spec for monitoring the API result #89

Closed reevik closed 5 years ago

reevik commented 5 years ago

Async processing is to be monitored through monitoring APIs, e.g:

waitUntil(session -> 
    http("monitor")
        .target("/monitor")
        .get()
        .saveTo("result"),
        result -> result.getStatusCode() == 200, 
        1 mins, 10 retries)

The measurement is to be done from the first monitoring request till the last attempt.

Operation signature is as follows:

waitUntil(Function<Spec, UserSession> specFunction ,
        Function<HttpResult, Boolean> specFunction,
        Duration delay, // Delay between two attempts
        Integer maxRetry // max attempt
)
reevik commented 5 years ago

We can realize the behavior with run-retryIf specs.