Skip to content

No retries on Error #15

@Marboni

Description

@Marboni

handle(Class) accepts Throwable, however run(RunnableRetry) catches only Exception. So the following statement will not retry:

retry(3)
                .delay(Duration.ofMillis(500))
                .handle(AssertionError.class)
                .run(() -> {
                    get("/eventually/consistent/resources")
                            .then()
                            .statusCode(200);
                });

Catching Error is not recommended in most cases, but in this case it will help to make the framework useful in unit tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions