mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Revise wording for PauseMode documentation
See gh-36044
This commit is contained in:
+12
-13
@@ -13,7 +13,7 @@ will be in a "stopped" state until the context is used again by a test. Note, ho
|
||||
that `SmartLifecycle` components can opt out of pausing by returning `false` from
|
||||
`SmartLifecycle#isPauseable()`.
|
||||
|
||||
You can control whether unused application contexts should be paused by setting the
|
||||
You can control whether inactive application contexts should be paused by setting the
|
||||
`PauseMode` to one of the following supported values.
|
||||
|
||||
`ALWAYS` :: Always pause inactive application contexts.
|
||||
@@ -28,19 +28,18 @@ line or a build script by setting a JVM system property named
|
||||
an alternative, you can set the property via the
|
||||
xref:appendix.adoc#appendix-spring-properties[`SpringProperties`] mechanism.
|
||||
|
||||
For example, if you encounter issues with `Lifecycle` components that cannot or should
|
||||
not opt out of pausing, or if you discover that your test suite runs more slowly due to
|
||||
the pausing and restarting of application contexts, you can disable the pausing feature
|
||||
by setting the `spring.test.context.cache.pause` property to `never`.
|
||||
|
||||
```shell
|
||||
-Dspring.test.context.cache.pause=never
|
||||
```
|
||||
|
||||
Although `ON_CONTEXT_SWITCH` is the default pause mode, you still have the option to
|
||||
enable context pausing for all usage scenarios (including context switches) by setting
|
||||
the `spring.test.context.cache.pause` property to `always`.
|
||||
For example, if you want inactive application contexts to always be paused, you can
|
||||
switch from the default `ON_CONTEXT_SWITCH` mode to `ALWAYS` by setting the
|
||||
`spring.test.context.cache.pause` system property to `always`.
|
||||
|
||||
```shell
|
||||
-Dspring.test.context.cache.pause=always
|
||||
```
|
||||
Similarly, if you encounter issues with `Lifecycle` components that cannot or should not
|
||||
opt out of pausing, or if you discover that your test suite runs more slowly due to the
|
||||
pausing and restarting of application contexts, you can disable the pausing feature by
|
||||
setting the `spring.test.context.cache.pause` system property to `never`.
|
||||
|
||||
```shell
|
||||
-Dspring.test.context.cache.pause=never
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user