lasdf1234 commented on code in PR #11882:
URL: https://github.com/apache/gravitino/pull/11882#discussion_r3733134376
##########
core/src/test/java/org/apache/gravitino/storage/relational/service/TestGroupMetaService.java:
##########
@@ -1100,6 +1101,30 @@ void testGroupExtDel() throws IOException {
assertThrowsExt(NoSuchEntityException.class, () ->
svc.deleteGroup(group.nameIdentifier()));
}
+ @TestTemplate
+ void testGroupPagination() throws IOException {
+ createAndInsertMakeLake(metalakeName);
+ GroupMetaService svc = GroupMetaService.getInstance();
+ svc.insertGroup(
+ createGroupEntity(
+ RandomIdGenerator.INSTANCE.nextId(),
+ AuthorizationUtils.ofGroupNamespace(metalakeName),
+ "g1",
+ AUDIT_INFO),
+ false);
+
+ Assertions.assertEquals(1, svc.countGroupsByMetalake(metalakeName));
+
+ PagedResult<GroupEntity> page =
svc.listGroupsByMetalakePaginated(metalakeName, 0, 10);
Review Comment:
The missing test has been supplemented.
##########
core/src/test/java/org/apache/gravitino/storage/relational/service/TestUserMetaService.java:
##########
@@ -1262,6 +1263,23 @@ void batchGetAuthSubjectsForUser() throws IOException {
assertTrue(none.isEmpty());
}
+ @TestTemplate
+ void testUserPagination() throws IOException {
+ UserMetaService svc = userMetaService();
+ UserEntity user = userWithExtId("u1", "ext-page-1");
+ svc.insertUser(user, false);
+
+ Assertions.assertEquals(1, svc.countUsersByMetalake(metalakeName));
+
+ PagedResult<UserEntity> page =
svc.listUsersByMetalakePaginated(metalakeName, 0, 10);
Review Comment:
The missing test has been supplemented.
--
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]