This is an automated email from the ASF dual-hosted git repository.

collado pushed a commit to branch mcollado-catalog-admin-revoke
in repository https://gitbox.apache.org/repos/asf/polaris.git


The following commit(s) were added to refs/heads/mcollado-catalog-admin-revoke 
by this push:
     new bf22384476 Fix test name collisions in ManagementServiceIntegrationTest
bf22384476 is described below

commit bf22384476dbe3e69b8fbbcb4e2bf167a5f984c3
Author: Michael Collado <[email protected]>
AuthorDate: Wed Mar 4 15:34:49 2026 -0800

    Fix test name collisions in ManagementServiceIntegrationTest
    
    Multiple tests were using the same entity name hints ("mypr33" and 
"principal1"),
    causing 409 CONFLICT errors when tests run in parallel. This change makes 
each
    test use unique entity names based on the test function name.
    
    Fixed tests:
    - testCatalogAdminGrantAndRevokeCatalogRoles
    - testServiceAdminCanTransferCatalogAdmin
    - testCatalogAdminGrantAndRevokeCatalogRolesFromWrongCatalog
    - testTableManageAccessCanGrantAndRevokeFromCatalogRoles
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 .../it/test/PolarisManagementServiceIntegrationTest.java   | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisManagementServiceIntegrationTest.java
 
b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisManagementServiceIntegrationTest.java
index bc641ce812..532f7b6838 100644
--- 
a/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisManagementServiceIntegrationTest.java
+++ 
b/integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisManagementServiceIntegrationTest.java
@@ -1724,7 +1724,7 @@ public class PolarisManagementServiceIntegrationTest {
   public void testCatalogAdminGrantAndRevokeCatalogRoles() {
     // Create a PrincipalRole and a new catalog. Grant the catalog_admin role 
to the new principal
     // role
-    String principalRoleName = client.newEntityName("mypr33");
+    String principalRoleName = 
client.newEntityName("mypr_catalog_admin_grant_revoke");
     managementApi.createPrincipalRole(principalRoleName);
 
     String catalogName = client.newEntityName("myuniquetestcatalog");
@@ -1743,7 +1743,7 @@ public class PolarisManagementServiceIntegrationTest {
     managementApi.grantCatalogRoleToPrincipalRole(principalRoleName, 
catalogName, catalogAdminRole);
 
     PrincipalWithCredentials catalogAdminPrincipal =
-        managementApi.createPrincipal(client.newEntityName("principal1"));
+        
managementApi.createPrincipal(client.newEntityName("principal_catalog_admin_grant_revoke"));
 
     managementApi.assignPrincipalRole(
         catalogAdminPrincipal.getPrincipal().getName(), principalRoleName);
@@ -1834,7 +1834,7 @@ public class PolarisManagementServiceIntegrationTest {
   public void testServiceAdminCanTransferCatalogAdmin() {
     // Create a PrincipalRole and a new catalog. Grant the catalog_admin role 
to the new principal
     // role
-    String principalRoleName = client.newEntityName("mypr33");
+    String principalRoleName = 
client.newEntityName("mypr_service_admin_transfer");
     PrincipalRole principalRole1 = new PrincipalRole(principalRoleName);
     managementApi.createPrincipalRole(principalRole1);
 
@@ -1854,7 +1854,7 @@ public class PolarisManagementServiceIntegrationTest {
     managementApi.grantCatalogRoleToPrincipalRole(principalRoleName, 
catalogName, catalogAdminRole);
 
     PrincipalWithCredentials catalogAdminPrincipal =
-        managementApi.createPrincipal(client.newEntityName("principal1"));
+        
managementApi.createPrincipal(client.newEntityName("principal_service_admin_transfer"));
 
     managementApi.assignPrincipalRole(
         catalogAdminPrincipal.getPrincipal().getName(), 
principalRole1.getName());
@@ -1902,7 +1902,7 @@ public class PolarisManagementServiceIntegrationTest {
   public void testCatalogAdminGrantAndRevokeCatalogRolesFromWrongCatalog() {
     // Create a PrincipalRole and a new catalog. Grant the catalog_admin role 
to the new principal
     // role
-    String principalRoleName = client.newEntityName("mypr33");
+    String principalRoleName = client.newEntityName("mypr_wrong_catalog");
     PrincipalRole principalRole1 = new PrincipalRole(principalRoleName);
     managementApi.createPrincipalRole(principalRole1);
 
@@ -1940,7 +1940,7 @@ public class PolarisManagementServiceIntegrationTest {
 
     // Create a principal and grant the principal role to it
     PrincipalWithCredentials catalogAdminPrincipal =
-        managementApi.createPrincipal(client.newEntityName("principal1"));
+        
managementApi.createPrincipal(client.newEntityName("principal_wrong_catalog"));
     managementApi.assignPrincipalRole(
         catalogAdminPrincipal.getPrincipal().getName(), 
principalRole1.getName());
 
@@ -1965,7 +1965,7 @@ public class PolarisManagementServiceIntegrationTest {
   @Test
   public void testTableManageAccessCanGrantAndRevokeFromCatalogRoles() {
     // Create a PrincipalRole and a new catalog.
-    String principalRoleName = client.newEntityName("mypr33");
+    String principalRoleName = client.newEntityName("mypr_table_manage");
     PrincipalRole principalRole1 = new PrincipalRole(principalRoleName);
     managementApi.createPrincipalRole(principalRole1);
 

Reply via email to