rcjverhoef commented on code in PR #11143:
URL: https://github.com/apache/iceberg/pull/11143#discussion_r1763241863


##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -2409,7 +2409,7 @@ public void testPaginationForListTables() {
     RESTCatalog catalog =
         new RESTCatalog(SessionCatalog.SessionContext.createEmpty(), (config) 
-> adapter);
     catalog.initialize("test", 
ImmutableMap.of(RESTSessionCatalog.REST_PAGE_SIZE, "10"));
-    int numberOfItems = 30;
+    int numberOfItems = 28;

Review Comment:
   @singhpk234, @rahil-c: I pushed a simple change to make the test 
parameterized and test a few cases: 21, 25, 29, 30. 
   
   - 21 is an edge case since that is the first amount we have 3 pages to 
present with the test setup
   - 25 & 29 are somewhat cases when we are half or 90% of the page but nothing 
after
   - 30 which is a page full, but like the others should return an empty 
page-token
   
   25 & 29 might be some superfluous to be honest. Might also make an argument 
for testing 21-30 entirely then.
   
   Thoughts?
   Thoughts?



##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -2409,7 +2409,7 @@ public void testPaginationForListTables() {
     RESTCatalog catalog =
         new RESTCatalog(SessionCatalog.SessionContext.createEmpty(), (config) 
-> adapter);
     catalog.initialize("test", 
ImmutableMap.of(RESTSessionCatalog.REST_PAGE_SIZE, "10"));
-    int numberOfItems = 30;
+    int numberOfItems = 28;

Review Comment:
   @singhpk234, @rahil-c: I pushed a simple change to make the test 
parameterized and test a few cases: 21, 25, 29, 30. 
   
   - 21 is an edge case since that is the first amount we have 3 pages to 
present with the test setup
   - 25 & 29 are somewhat cases when we are half or 90% of the page but nothing 
after
   - 30 which is a page full, but like the others should return an empty 
page-token
   
   25 & 29 might be some superfluous to be honest. Might also make an argument 
for testing 21-30 entirely then.
   
   Thoughts?



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to