You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "slfan1989 (via GitHub)" <gi...@apache.org> on 2025/07/05 07:49:14 UTC

Re: [PR] HADOOP-19424. [S3A] Upgrade JUnit from 4 to 5 in hadoop-aws. [hadoop]

slfan1989 commented on code in PR #7752:
URL: https://github.com/apache/hadoop/pull/7752#discussion_r2186930332


##########
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/TestS3AInputPolicies.java:
##########
@@ -79,13 +76,18 @@ public static Collection<Object[]> data() {
     });
   }
 
-  @Test
-  public void testInputPolicies() throws Throwable {
-    Assert.assertEquals(
-        String.format("calculateRequestLimit(%s, %d, %d, %d, %d)",
-            policy, targetPos, length, contentLength, readahead),
+  @MethodSource("data")
+  @ParameterizedTest
+  public void testInputPolicies(S3AInputPolicy pPolicy,
+      long pTargetPos, long pLength, long pContentLength,
+      long pReadahead, long pExpectedLimit) throws Throwable {
+    initTestS3AInputPolicies(pPolicy, pTargetPos, pLength, pContentLength,

Review Comment:
   @steveloughran Regarding the Parameterized test issue, we have found some solutions, although it will significantly increase the workload. We can call initTestS3AInputPolicies in each unit test and explicitly call the setup method in the init method, which ensures that the tests pass.
   cc: @cnauroth 



-- 
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: common-issues-unsubscribe@hadoop.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org