linkedin/cruise-control

Missing EasyMock.verify in unit tests

Open

#1,408 建立於 2020年12月3日

在 GitHub 查看
 (8 留言) (0 反應) (0 負責人)Java (649 fork)auto 404
good first issueproductivity

倉庫指標

Star
 (3,036 star)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南