This is an automated email from the ASF dual-hosted git repository. liuxun pushed a commit to branch fix-cache in repository https://gitbox.apache.org/repos/asf/gravitino.git
commit a434f1870a10efa29e3c704749d48e56b84135ea Author: Eric Chang <[email protected]> AuthorDate: Wed Aug 20 20:18:51 2025 +0800 fix: fix wrong NameIdentifier of Role, User, Group in TestUtil.java --- core/src/test/java/org/apache/gravitino/utils/TestUtil.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/org/apache/gravitino/utils/TestUtil.java b/core/src/test/java/org/apache/gravitino/utils/TestUtil.java index f0e9e11c51..2662a34d0b 100644 --- a/core/src/test/java/org/apache/gravitino/utils/TestUtil.java +++ b/core/src/test/java/org/apache/gravitino/utils/TestUtil.java @@ -30,6 +30,7 @@ import java.util.Map; import org.apache.gravitino.Catalog; import org.apache.gravitino.NameIdentifier; import org.apache.gravitino.Namespace; +import org.apache.gravitino.authorization.AuthorizationUtils; import org.apache.gravitino.authorization.Privileges; import org.apache.gravitino.authorization.SecurableObject; import org.apache.gravitino.file.Fileset; @@ -389,6 +390,7 @@ public class TestUtil { public static UserEntity getTestUserEntity( long id, String name, String metalake, List<Long> roles) { return UserEntity.builder() + .withNamespace(AuthorizationUtils.ofUserNamespace(metalake)) .withId(id) .withName(name) .withNamespace(NamespaceUtil.ofUser(metalake)) @@ -421,7 +423,7 @@ public class TestUtil { return GroupEntity.builder() .withId(id) .withName(name) - .withNamespace(NamespaceUtil.ofGroup(metalake)) + .withNamespace(AuthorizationUtils.ofGroupNamespace(metalake)) .withAuditInfo(getTestAuditInfo()) .withRoleNames(roles) .build(); @@ -449,7 +451,7 @@ public class TestUtil { return RoleEntity.builder() .withId(id) .withName(name) - .withNamespace(NamespaceUtil.ofRole(metalake)) + .withNamespace(AuthorizationUtils.ofRoleNamespace(metalake)) .withAuditInfo(getTestAuditInfo()) .withSecurableObjects(ImmutableList.of(getMockSecurableObject())) .build();
