Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.5.0
-
None
-
None
Description
@After public void after() throws Exception { if (client != null) { Set<TSentryRole> tRoles = client.listRoles(ADMIN_USER); if (tRoles != null) { for (TSentryRole tRole : tRoles) { client.dropRole(ADMIN_USER, tRole.getRoleName()); } } client.close(); } policyFilePath.delete(); }
- client in after() isn't run under client subject, if client need client subject, such as in Kerberos mode, it may throw an exception.
- policyFilePath.delete(); may not execute if the client throws an exception when it does operations like clean db or close, there should be a try-catch-finally statement.
Attachments
Attachments
Issue Links
- links to