linkedin/cruise-control

Missing EasyMock.verify in unit tests

Open

#1,408 opened on 2020年12月3日

GitHub で見る
 (8 comments) (0 reactions) (0 assignees)Java (649 forks)auto 404
good first issueproductivity

Repository metrics

Stars
 (3,036 stars)
PR merge metrics
 (PR metrics pending)

説明

In some unit tests, before resetting mocked objects or after mocked objects get used, EasyMock.verify does not get invoked on mocked objects. So, we should add it.

For example, in UserTaskManagerTest.java and KafkaCruiseControlServletEndpointTest.java. There could be more cases. So, I suggest thoroughly iterate all cases where EasyMock gets used.

It may require re-writing some unit tests since naively inserting verify before resetting mocks or at the end of unit tests fail in most cases.

コントリビューターガイド