Skip to content

An exception detected by VertxTestContext is not being informed to Junit5's ExtensionContext object in an beforeAll method #86

@cvgaviao

Description

@cvgaviao

Describe the feature

Junit5 allows multiple extensions to work together inside one test class. Those extensions can share data and errors through the ExtensionContext object.

Any extension can use the method extensionContext.getExecutionException().isPresent() to detect when an error have occurred in any of other used extensions and took a properly path. In my case, to prevent the running of an unnecessary code.
The problem I'm facing is when executing a vert.x future inside a beforeAll() method and the test class is using a @TestInstance(Lifecycle.PER_CLASS).
An exception thrown by the future is not being rethrown by the VertxExtension in this case, it is only rethrowing an exception in the joinActiveTestContexts method (not reached in beforeAll methods).

Contribution

I'm willing in providing a PR for this, but I want to be sure if this is desired by the people that are responsible for vertx-junit5 before putting my hands on it.

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