Browse Source

Revise wording for PauseMode documentation

See gh-36044
pull/36162/head
Sam Brannen 2 weeks ago
parent
commit
9df19dedaf
  1. 21
      framework-docs/modules/ROOT/pages/testing/testcontext-framework/ctx-management/context-pausing.adoc

21
framework-docs/modules/ROOT/pages/testing/testcontext-framework/ctx-management/context-pausing.adoc

@ -13,7 +13,7 @@ will be in a "stopped" state until the context is used again by a test. Note, ho @@ -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 @@ -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`.
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=never
-Dspring.test.context.cache.pause=always
```
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`.
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=always
-Dspring.test.context.cache.pause=never
```

Loading…
Cancel
Save