[ https://issues.apache.org/jira/browse/FLINK-34402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17815096#comment-17815096 ]
Xintong Song commented on FLINK-34402: -------------------------------------- Hi [~nilerzhou], The description of this issue is a bit unclear to me. Could you provide a bit more information? - In which ITCase did you run into the problem? If it's an ITCase that is not yet exist and you are planning to add, it would be helpful to also provide the codes so others can reproduce the issue. - Where exactly are you suggesting to replace `ClassLoader.getSystemClassLoader()` with `Thread.currentThread().getContextClassLoader()`? BTW, it is discouraged to use Mockito for testing. See the Code Style and Quality Guide for more details. https://flink.apache.org/how-to-contribute/code-style-and-quality-common/#avoid-mockito---use-reusable-test-implementations > Class loading conflicts when using PowerMock in ITcase. > -------------------------------------------------------- > > Key: FLINK-34402 > URL: https://issues.apache.org/jira/browse/FLINK-34402 > Project: Flink > Issue Type: Bug > Components: Runtime / Coordination > Affects Versions: 1.19.0 > Reporter: yisha zhou > Assignee: yisha zhou > Priority: Major > Fix For: 1.19.0 > > > Currently when no user jars exist, system classLoader will be used to load > classes as default. However, if we use powerMock to create some ITCases, the > framework will utilize JavassistMockClassLoader to load classes. Forcing the > use of the system classLoader can lead to class loading conflict issue. > Therefore we should use Thread.currentThread().getContextClassLoader() > instead of > ClassLoader.getSystemClassLoader() here. -- This message was sent by Atlassian Jira (v8.20.10#820010)