RocMarshal commented on code in PR #18983:
URL: https://github.com/apache/flink/pull/18983#discussion_r865949156


##########
flink-yarn/src/test/java/org/apache/flink/yarn/YarnFileStageTestS3ITCase.java:
##########
@@ -173,36 +175,44 @@ private void testRecursiveUploadForYarn(String scheme, 
String pathSuffix) throws
         }
     }
 
-    @Test
-    @RetryOnFailure(times = 3)
-    public void testRecursiveUploadForYarnS3n() throws Exception {
+    @TestTemplate
+    @RetryOnException(times = 3, exception = Exception.class)
+    public void testRecursiveUploadForYarnS3n(@TempDir File tempFolder) throws 
Exception {
         // skip test on Hadoop 3: 
https://issues.apache.org/jira/browse/HADOOP-14738
-        Assume.assumeTrue(
-                "This test is skipped for Hadoop versions above 3",
-                
VersionUtil.compareVersions(System.getProperty("hadoop.version"), "3.0.0") < 0);
+        assumeTrue(
+                
VersionUtil.compareVersions(System.getProperty("hadoop.version"), "3.0.0") < 0,
+                "This test is skipped for Hadoop versions above 3");
 
         try {
             Class.forName("org.apache.hadoop.fs.s3native.NativeS3FileSystem");
         } catch (ClassNotFoundException e) {
             // not in the classpath, cannot run this test
             String msg = "Skipping test because NativeS3FileSystem is not in 
the class path";
             log.info(msg);
-            assumeNoException(msg, e);
+            assumingThat(
+                    true,
+                    () -> {
+                        throw e;
+                    });
         }
-        testRecursiveUploadForYarn("s3n", "testYarn-s3n");
+        testRecursiveUploadForYarn("s3n", "testYarn-s3n", tempFolder);
     }
 
-    @Test
-    @RetryOnFailure(times = 3)
-    public void testRecursiveUploadForYarnS3a() throws Exception {
+    @TestTemplate
+    @RetryOnException(times = 3, exception = Exception.class)
+    public void testRecursiveUploadForYarnS3a(@TempDir File tempFolder) throws 
Exception {
         try {
             Class.forName("org.apache.hadoop.fs.s3a.S3AFileSystem");
         } catch (ClassNotFoundException e) {
             // not in the classpath, cannot run this test
             String msg = "Skipping test because S3AFileSystem is not in the 
class path";
             log.info(msg);
-            assumeNoException(msg, e);
+            assumingThat(

Review Comment:
   Done.



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

Reply via email to