Skip to content

Introduce UnrecoverableThrowable abstraction for exception that should terminate test plan #3037

Open
@edudar

Description

@edudar

Only one error terminates the test plan: OutOfMemoryError. Sometimes it might be beneficial to have more control over this. In my case, I'm bringing up test containers before the test suite starts. I implemented this using TestExecutionListener. I start containers in testPlanExecutionStarted and stop them in testPlanExecutionFinished. It happens from time to time that a container does not start. In this case, I want to terminate the test plan because it does not make sense to run any tests when some required container is down.

It'd be good to introduce a class or, better, an interface like UnrecoverableThrowable and check if throwable is an instance of OutOfMemory || UnrecoverableThrowable. Then users could create custom exceptions that implement said interface and terminate the test plan.

If this idea sounds, I can create a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions