peterxcli commented on code in PR #8307:
URL: https://github.com/apache/ozone/pull/8307#discussion_r2097074102


##########
hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/s3/endpoint/TestBucketList.java:
##########
@@ -541,6 +544,39 @@ public void testListObjectsWithInvalidMaxKeys() throws 
Exception {
     assertEquals(S3ErrorTable.INVALID_ARGUMENT.getCode(), e2.getCode());
   }
 
+  @Test
+  public void testListObjectsRespectsConfiguredMaxKeysLimit() throws Exception 
{
+    // Arrange: Create a bucket with 1001 keys
+    String[] keys = IntStream.range(0, 1001).mapToObj(i -> "file" + 
i).toArray(String[]::new);
+    OzoneClient client = createClientWithKeys(keys);
+
+    // Arrange: Set the max-keys limit in the configuration
+    OzoneConfiguration config = new OzoneConfiguration();
+    final String configuredMaxKeysLimit = "900";

Review Comment:
   This is ok, but my original thought is just want this to be a very low 
value, like 10, so we don't need to create too much key in test.



-- 
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...@ozone.apache.org

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


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

Reply via email to