spring-framework/spring-test
Sam Brannen 29248dff15 Use correct ClassLoader in MicrometerObservationRegistryTestExecutionListener
In the original implementation of
MicrometerObservationRegistryTestExecutionListener I accidentally
imported JUnit 5's org.junit.platform.launcher.TestExecutionListener
instead Spring's
org.springframework.test.context.TestExecutionListener. The code
therefore attempts to use the ClassLoader for the JUnit Platform's
TestExecutionListener which may fail to see the required types. In
addition, if the JUnit Platform's TestExecutionListener is not on the
classpath, the attempt to access its ClassLoader will fail.

This commit addresses this by properly using the ClassLoader for
Spring's TestExecutionListener to detect dependencies of the
MicrometerObservationRegistryTestExecutionListener.

Closes gh-30726
2023-06-22 15:55:46 +02:00
..
src Use correct ClassLoader in MicrometerObservationRegistryTestExecutionListener 2023-06-22 15:55:46 +02:00
.springBeans Support classes AND locations in @ContextConfiguration 2014-04-01 19:45:56 +02:00
spring-test.gradle Introduce TestExecutionListener for Micrometer ObservationRegistry 2023-06-14 14:35:53 +02:00