harshal-16 commented on code in PR #5990:
URL: https://github.com/apache/hive/pull/5990#discussion_r2269008585


##########
ql/src/test/org/apache/hadoop/hive/ql/parse/repl/TestCopyUtils.java:
##########
@@ -244,4 +261,91 @@ public void testParallelCopySuccess() throws Exception {
         Mockito.times(1)).invokeAll(callableCapture.capture());
     }
   }
+
+  @Test
+  public void testCopyFilesBetweenFSWithDestDirNotExistFailure() throws 
IOException {
+    Path srcPath1 = new Path(basePath, "file1.txt");
+    Path srcPath2 = new Path(basePath, "file2.txt");
+    Path dstPath = new Path(basePath, "copyDst");
+
+    try {
+      // Create source files
+      fileSystem.create(srcPath1).write("Content of file1".getBytes());
+      fileSystem.create(srcPath2).write("Content of file2".getBytes());
+
+      // Prepare source paths array
+      Path[] srcPaths = {srcPath1, srcPath2};
+
+
+      CopyUtils copyUtils = new CopyUtils("hive", hiveConf, fileSystem);
+      DataCopyStatistics copyStatistics = new DataCopyStatistics();
+      IOException thrown =
+              Assert.assertThrows(IOException.class, () -> {
+                copyUtils.copyFilesBetweenFS(fileSystem, srcPaths, fileSystem, 
dstPath, false, true, copyStatistics);
+              });
+      // this is supposed to come out of retryable function immediately 
without waiting as FileNotFound is not auto-recoverable error
+      Assert.assertEquals(IOException.class, thrown.getCause().getClass());

Review Comment:
   removed this



-- 
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: gitbox-unsubscr...@hive.apache.org

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


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

Reply via email to