geyanggang commented on code in PR #14532:
URL: https://github.com/apache/gravitino/pull/14532#discussion_r4450939405


##########
authorizations/authorization-ranger/src/test/java/org/apache/gravitino/authorization/ranger/integration/test/RangerITEnv.java:
##########
@@ -517,7 +517,7 @@ protected static void updateOrCreateRangerPolicy(
       Assertions.assertTrue(policies.size() <= 1);
       if (!policies.isEmpty()) {
         RangerPolicy policy = policies.get(0);
-        policy.getPolicyItems().addAll(policyItems);
+        policyItems.forEach(policy::addPolicyItem);

Review Comment:
   Agreed. These policies come from findPolicies, whose list response from 
Admin 2.4 doesn't include createTime, which is why the ITs passed, but that's 
fragile. RangerITEnv now uses the plugin's RangerClientExtension, which covers 
both this call and RangerHiveIT.replacePolicyOwnerRole; all Ranger and chain 
ITs pass.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to