pvary commented on code in PR #14243:
URL: https://github.com/apache/iceberg/pull/14243#discussion_r2444892545


##########
flink/v2.1/flink/src/test/java/org/apache/iceberg/flink/maintenance/api/TestZkLockFactory.java:
##########
@@ -51,4 +76,75 @@ public void after() throws IOException {
       zkTestServer.close();
     }
   }
+
+  @Test
+  void testAllRetryPoliciesCreationAndType() {

Review Comment:
   Something like this?
   ```
    private static Stream<Arguments> retryPolicyProvider() {
       return Stream.of(
           Arguments.of(ZKRetryPolicies.ONE_TIME, RetryOneTime.class),
           Arguments.of(ZKRetryPolicies.N_TIME, RetryNTimes.class),
           Arguments.of(ZKRetryPolicies.EXPONENTIAL_BACKOFF, 
ExponentialBackoffRetry.class),
           Arguments.of(
               ZKRetryPolicies.BOUNDED_EXPONENTIAL_BACKOFF, 
BoundedExponentialBackoffRetry.class),
           Arguments.of(ZKRetryPolicies.UNTIL_ELAPSED, 
RetryUntilElapsed.class));
     }
   
     @ParameterizedTest
     @MethodSource("retryPolicyProvider")
     void testRetryPolicyCreationAndType(
         ZKRetryPolicies policy, Class<? extends RetryPolicy> expectedClass) {
       ZkLockFactory factory =
           new ZkLockFactory("localhost:2181", "test", 3000, 3000, 1000, 3, 
2000, policy);
   
       RetryPolicy retryPolicy = factory.createRetryPolicy();
   
       assertThat(retryPolicy)
           .as("RetryPolicy should not be null for policy %s", policy)
           .isNotNull()
           .as("Expected %s for policy %s", expectedClass.getSimpleName(), 
policy)
           .isInstanceOf(expectedClass);
     }
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to