Open
Description
When running tests using @DirtiesContext
and a test class includes multiple @Nested
classes, the context is dirtied and refreshed after each nested class, even when using the coarsest mode possible level (ClassMode.AFTER_CLASS
).
There is currently no way to specify that @DirtiesContext
should only dirty the context after the top-level class but not after each nested class.
A ClassMode.AFTER_MAIN_CLASS
is suggested to specify the desired functionality.