spring-framework/framework-docs/modules/ROOT/pages
Sam Brannen aa2028127f Overhaul TestExecutionListener for Micrometer ObservationRegistry
This commit overhauls the TestExecutionListener for Micrometer's
ObservationRegistry that was introduced in the previous commit.

Specifically, this commit:

- Renames the listener to MicrometerObservationRegistryTestExecutionListener
  since the use of a ThreadLocal is an implementation detail that may
  change over time.

- Makes the listener package-private instead of public in order to
  allow the team greater flexibility in evolving this feature.

- Eagerly loads the ObservationThreadLocalAccessor class and verifies
  that it has a getObservationRegistry() method to ensure that the
  listener is properly skipped when SpringFactoriesLoader attempts to
  load it, if Micrometer 1.10.8+ is not on the classpath.

- Switches the listener's automatic registration order to 2500 in order
  to register it after the DependencyInjectionTestExecutionListener.

- Only tracks the previous ObservationRegistry in beforeTestMethod() if
  the test's ApplicationContext contains an ObservationRegistry bean.

- Properly removes the TestContext attribute for the previous
  ObservationRegistry in afterTestMethod().

- Introduces DEBUG logging for diagnostics.

- Adds an entry in the Javadoc for TestExecutionListener as well as in
  the Testing chapter in the reference manual.

Closes gh-30658
2023-06-14 14:36:05 +02:00
..
core Polish null-safety documentation 2023-06-13 11:57:41 +02:00
data-access Polish "Fix invalid link in transaction resources" 2023-05-31 12:26:32 +02:00
integration Fix typo 2023-05-11 16:35:20 +02:00
languages Migrate to Asciidoctor Tabs 2023-05-04 15:35:05 +01:00
testing Overhaul TestExecutionListener for Micrometer ObservationRegistry 2023-06-14 14:36:05 +02:00
web Polishing 2023-06-01 14:57:50 +02:00
appendix.adoc Improve how the build deals with javadoc invalid references 2023-05-16 15:04:10 +02:00
attributes.adoc
core.adoc Remove includes 2023-05-04 15:35:05 +01:00
data-access.adoc Enable Section Summary TOC for small pages 2023-05-04 15:35:05 +01:00
index.adoc Remove PDF Link 2023-05-05 16:56:25 +01:00
integration.adoc Enable Section Summary TOC for small pages 2023-05-04 15:35:05 +01:00
languages.adoc Enable Section Summary TOC for small pages 2023-05-04 15:35:05 +01:00
overview.adoc Remove includes 2023-05-04 15:35:05 +01:00
page-layout.adoc Remove unnecessary asciidoc attributes 2023-05-04 15:35:05 +01:00
rsocket.adoc Fix migration to asciidoctor tabs 2023-05-09 12:15:43 +01:00
testing.adoc Enable Section Summary TOC for small pages 2023-05-04 15:35:05 +01:00
web-reactive.adoc Structural Fixes 2023-05-04 15:35:05 +01:00
web.adoc Enable Section Summary TOC for small pages 2023-05-04 15:35:05 +01:00