Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce TestExecutionListener for Micrometer's ObservationRegistry in the TestContext framework #30658

Commits on Jun 12, 2023

  1. Added ObservationThreadLocalTestListener

    without this change we have no option to pass the ObservationRegistry that is registered in the given TestContext's ApplicationContext as the one that should be used by the ObservationThreadLocalAccessor.
    
    with this change we create a TestExecutionListener that will set an ObservationRegistry registered in the TestContext's ApplicationContext for each test class and after each test class will restore the previously stored ObservationRegistry instance
    marcingrzejszczak committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    5a9d85e View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2023

  1. Update spring-test/src/main/java/org/springframework/test/context/obs…

    …ervation/ObservationThreadLocalTestListener.java
    
    Co-authored-by: Sam Brannen <sam@sambrannen.com>
    marcingrzejszczak and sbrannen committed Jun 13, 2023
    Configuration menu
    Copy the full SHA
    1c95b1c View commit details
    Browse the repository at this point in the history
  2. Update spring-test/src/main/java/org/springframework/test/context/obs…

    …ervation/ObservationThreadLocalTestListener.java
    
    Co-authored-by: Sam Brannen <sam@sambrannen.com>
    marcingrzejszczak and sbrannen committed Jun 13, 2023
    Configuration menu
    Copy the full SHA
    dd9b3f8 View commit details
    Browse the repository at this point in the history
  3. Update spring-test/src/main/java/org/springframework/test/context/obs…

    …ervation/ObservationThreadLocalTestListener.java
    
    Co-authored-by: Sam Brannen <sam@sambrannen.com>
    marcingrzejszczak and sbrannen committed Jun 13, 2023
    Configuration menu
    Copy the full SHA
    724b4bf View commit details
    Browse the repository at this point in the history
  4. Update spring-test/src/main/java/org/springframework/test/context/obs…

    …ervation/package-info.java
    
    Co-authored-by: Sam Brannen <sam@sambrannen.com>
    marcingrzejszczak and sbrannen committed Jun 13, 2023
    Configuration menu
    Copy the full SHA
    3ad61ed View commit details
    Browse the repository at this point in the history
  5. Update spring-test/src/test/java/org/springframework/test/context/obs…

    …ervation/ObservationThreadLocalTestListenerTests.java
    
    Co-authored-by: Sam Brannen <sam@sambrannen.com>
    marcingrzejszczak and sbrannen committed Jun 13, 2023
    Configuration menu
    Copy the full SHA
    2237def View commit details
    Browse the repository at this point in the history
  6. Applied changes following the review

    - dependencies ordered alphabetically
    - renamed the test execution listener to contain "execution" and "micrometer" in the name
    - production code lines are smaller (up to 100 chars)
    - test execution attribute is a private static final field
    - added javadocs in the test execution listener
    marcingrzejszczak committed Jun 13, 2023
    Configuration menu
    Copy the full SHA
    74ffe99 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2f23db0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    13cf317 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e77a986 View commit details
    Browse the repository at this point in the history