linkedin/cruise-control

Missing EasyMock.verify in unit tests

Open

#1408 aperta il 3 dic 2020

Vedi su GitHub
 (8 commenti) (0 reazioni) (0 assegnatari)Java (649 fork)auto 404
good first issueproductivity

Metriche repository

Star
 (3036 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor