Previously, the deferred line writing that is used, to print MockMvc
results to the console assumed that each DeferredLinesWriter would
only be used by a single thread at a time. This assumption does not
hold true when using JUnit 5's parallel test exection if the tests
running in parallel share an application context. This resulted in
a concurrent modification exception if one thread was adding lines
to the output while another was iterating over them.
This commit updates DeferredLinesWriter so that it uses thread local
storage for the deferred lines. This ensures that each List of lines
is only ever accessed by a single thread.
Closes gh-16179
Previously, DeferredLinesWriter would collect MockMvc output from
every test that has executed. If a test eventually failed, the
output from every test up to including the one that had failed would
be output, rather than just the output for the test that has just
failed.
This commit clears the deferred lines after each test, thereby
ensuring that when a failure occurs only the lines from the failing
test are output.
Fixes gh-17551
This commit updates ConfigurationPropertiesScanRegistrar to apply the
same component scan filters than the ones applied on standard classpath
scanning.
As a result, configuration properties scanning is automatically disabled
in slice tests and can be included by an explicit import or a dedicated
TypeFilter implementation if necessary.
Closes gh-16659
Meta-annotate `ClassPathExclusions` and `ClassPathOverrides` with
so that the `ModifiedClassPathExtension` no longer needs to be
used directly.
See gh-17491
Replace any direct `junit-platform-launcher` dependencies and instead
rely on the test runner providing it. Launcher related class are not
handled via reflection.
This update allows us to workaround SUREFIRE-1679.
Closes gh-17517
Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.
Closes gh-7316