You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
cvgaviao
changed the title
An exception detected by VertxTestContext is not being informed to Junit5's ExtensionContext object
An exception detected by VertxTestContext is not being informed to Junit5's ExtensionContext object in an beforeAll method
Sep 20, 2020
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.
The text was updated successfully, but these errors were encountered: