[ 
https://issues.apache.org/jira/browse/FLINK-34402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17815142#comment-17815142
 ] 

Xintong Song commented on FLINK-34402:
--------------------------------------

Thanks for the detailed information.

I think this should not be a bug. The reported issue doesn't really affect any 
real production use case. And Flink is not designed to be executed with a 
PowerMockRunner or JavassistMockClassLoader.

I'm also not familiar with other approaches for checking API calling times and 
query outputs, other than manually implementing them. But if the cases are only 
for internal usages in your company, you don't really need to follow the 
community code-style guides.

My suggestion would be to apply the proposed changes only to your internal 
fork. WDYT?

>  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)

Reply via email to