-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73879/
-----------------------------------------------------------

Review request for ranger.


Bugs: RANGER-2095
    https://issues.apache.org/jira/browse/RANGER-2095


Repository: ranger


Description
-------

The old commit is buggy and meaningless.
 
* testBlockAuditorRoleUserThrowsErrorForAuditKeyAdmin
* testBlockAuditorRoleUserThrowsErrorForAuditUserAdmin
* testBlockAuditorRoleUserSuccess

The 3 tests should test behavior of RangerBizUtil::blockAuditorRoleUser.
But it constructs a mocked RangerBizUtil, and stub blockAuditorRoleUser. The 
real RangerBizUtil::blockAuditorRoleUser is never being tested.

These @Mock annotated class members are invalid.

* currentUserSession
* vXResponse 
* context
* contextUtil

These members are not member of RangerBizUtil, so can not be injected into 
rangerBizUtil, we should not use it as class member.


Diffs
-----

  security-admin/src/test/java/org/apache/ranger/biz/TestRangerBizUtil.java 
22e290a666deaac42fc0106302abd151e135bd47 


Diff: https://reviews.apache.org/r/73879/diff/1/


Testing
-------

mvn test


Thanks,

Kirby Zhou

Reply via email to