metaswirl commented on code in PR #17228: URL: https://github.com/apache/flink/pull/17228#discussion_r851495599
########## flink-runtime/src/test/java/org/apache/flink/runtime/metrics/ReporterSetupTest.java: ########## @@ -47,17 +50,30 @@ import static org.junit.Assert.assertTrue; /** Tests for the {@link ReporterSetup}. */ -public class ReporterSetupTest extends TestLogger { +@ExtendWith(TestLoggerExtension.class) +class ReporterSetupTest { + + @RegisterExtension + static final ContextClassLoaderExtension CONTEXT_CLASS_LOADER_EXTENSION = + ContextClassLoaderExtension.builder() + .withServiceEntry( + MetricReporterFactory.class, + TestReporter1.class.getName(), + TestReporter2.class.getName(), + TestReporter11.class.getName(), + TestReporter12.class.getName(), + TestReporter13.class.getName()) + .build(); Review Comment: What is the benefit of using a custom class loader here? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org