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
Thanks for raising the issue and providing such detail.
This definitely appears to be a bug in the implementation of ClassBasedTestDescriptor.invokeTestInstancePreDestroyCallback(JupiterEngineExecutionContext), since it should in fact be using ExtensionRegistry.getReversedExtensions(Class<E>).
Prior to this commit, when using PER_CLASS test instance lifecycle
semantics, TestInstancePreDestroyCallback extensions were invoked in
the order in which they were registered, which violates the general
"wrapping" principle for extensions invoked after a container or test.
This commit fixes this by invoking TestInstancePreDestroyCallback
extensions in reverse registration order when PER_CLASS test instance
lifecycle semantics have been configured.
Fixes#2209
The extension
TestInstancePreDestroyCallback
does not follow the wrapping behavior of Extensions if the lifecycle isPER_CLASS
, as described in https://junit.org/junit5/docs/snapshot/user-guide/#extensions-execution-order-wrapping-behaviorThe expected order with lifecycle PER_CLASS
The order using JUnit 5.6.0. with lifecycle
PER_CLASS
The order using JUnit 5.6.0. with lifecycle
PER_METHOD
is as expectedSteps to reproduce
Context
The text was updated successfully, but these errors were encountered: