xunliu commented on code in PR #8297:
URL: https://github.com/apache/gravitino/pull/8297#discussion_r2314638096
##########
clients/client-java/src/test/java/org/apache/gravitino/client/integration/test/PolicyIT.java:
##########
@@ -466,17 +466,16 @@ public void testAssociatePoliciesToCatalog() {
Assertions.assertTrue(policies7[0].enabled());
// Test disable the policy then list again
- // todo: uncomment after the bug is fixed
- // https://github.com/apache/gravitino/issues/7787#issue-3255540700
- // Assertions.assertDoesNotThrow(() ->
metalake.disablePolicy(policy1.name()));
- // Policy[] policies8 =
relationalCatalog.supportsPolicies().listPolicyInfos();
- // Assertions.assertEquals(1, policies8.length);
- // Assertions.assertEquals(policy1.name(), policies8[0].name());
- // Assertions.assertFalse(policies8[0].enabled());
+ Assertions.assertDoesNotThrow(() ->
metalake.disablePolicy(policy1.name()));
+ Policy[] policies8 =
relationalCatalog.supportsPolicies().listPolicyInfos();
+ Assertions.assertEquals(1, policies8.length);
+ Assertions.assertEquals(policy1.name(), policies8[0].name());
+ Assertions.assertFalse(policies8[0].enabled());
+ Assertions.assertDoesNotThrow(() -> metalake.enablePolicy(policy1.name()));
// Test get associated policy for catalog
Policy policy =
relationalCatalog.supportsPolicies().getPolicy(policy1.name());
- Assertions.assertEquals(policy1, policy);
+ Assertions.assertEquals(policy1.enabled(), policy.enabled());
Review Comment:
hi @mchades
Because the policy modifies some information, So I changed assert conditions.
<img width="1458" height="295" alt="image"
src="https://github.com/user-attachments/assets/f9a58800-ff5a-4dd2-974a-7b48a22792b1"
/>
--
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]