@@ -31,10 +31,10 @@ under a key that is based solely on those locations. So, if `TestClassB` also de
31
31
`{"app-config.xml", "test-config.xml"}` for its locations (either explicitly or
32
32
implicitly through inheritance) but does not define `@WebAppConfiguration`, a different
33
33
`ContextLoader`, different active profiles, different context initializers, different
34
- test property sources, or a different parent context, then the same `ApplicationContext`
35
- is shared by both test classes. This means that the setup cost for loading an application
36
- context is incurred only once (per test suite), and subsequent test execution is much
37
- faster.
34
+ context customizers, different test or dynamic property sources, or a different parent
35
+ context, then the same `ApplicationContext` is shared by both test classes. This means
36
+ that the setup cost for loading an application context is incurred only once (per test
37
+ suite), and subsequent test execution is much faster.
38
38
39
39
.Test suites and forked processes
40
40
[NOTE]
@@ -71,10 +71,11 @@ the underlying context cache, you can set the log level for the
71
71
In the unlikely case that a test corrupts the application context and requires reloading
72
72
(for example, by modifying a bean definition or the state of an application object), you
73
73
can annotate your test class or test method with `@DirtiesContext` (see the discussion of
74
- `@DirtiesContext` in xref:testing/annotations/integration-spring/annotation-dirtiescontext.adoc[Spring Testing Annotations]
75
- ). This instructs Spring to remove the context from the cache and rebuild
76
- the application context before running the next test that requires the same application
77
- context. Note that support for the `@DirtiesContext` annotation is provided by the
74
+ `@DirtiesContext` in
75
+ xref:testing/annotations/integration-spring/annotation-dirtiescontext.adoc[Spring Testing Annotations]).
76
+ This instructs Spring to remove the context from the cache and rebuild the application
77
+ context before running the next test that requires the same application context. Note
78
+ that support for the `@DirtiesContext` annotation is provided by the
78
79
`DirtiesContextBeforeModesTestExecutionListener` and the
79
80
`DirtiesContextTestExecutionListener`, which are enabled by default.
80
81
0 commit comments