[ 
https://issues.apache.org/jira/browse/FLINK-27605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gabor Somogyi reassigned FLINK-27605:
-------------------------------------

    Assignee: Gabor Somogyi

> Upgrade mockito to a version where static function mocking is possible
> ----------------------------------------------------------------------
>
>                 Key: FLINK-27605
>                 URL: https://issues.apache.org/jira/browse/FLINK-27605
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Tests
>    Affects Versions: 1.16.0
>            Reporter: Gabor Somogyi
>            Assignee: Gabor Somogyi
>            Priority: Major
>
> There are some external APIs used by Flink which are designed in a way which 
> is super hard to test.
> Such a pattern is when a class instance is only available through a static 
> function and no publicly available constructor exists.
> A good example to this is "UserGroupInformation" class in Hadoop library.
> We've listed many different possibilities how to make it testable in the 
> following place: 
> https://github.com/apache/flink/pull/19372#discussion_r849691193
> After deep consideration we've agreed to use static function mocking in such 
> exceptional cases in order to make code clean and maintainable.
> It should be emphasized that the general direction not changed in terms of 
> Mockito and Powermock usage. It should be avoided as much as possible.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to