[ https://issues.apache.org/jira/browse/HADOOP-16878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17071107#comment-17071107 ]
Ayush Saxena commented on HADOOP-16878: --------------------------------------- The Current PR still, fails for me : {code:java} [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running org.apache.hadoop.hdfs.TestDistributedFileSystem [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 8.629 s <<< FAILURE! - in org.apache.hadoop.hdfs.TestDistributedFileSystem [ERROR] testCopyBetweenFsEqualPath(org.apache.hadoop.hdfs.TestDistributedFileSystem) Time elapsed: 8.346 s <<< FAILURE! java.lang.AssertionError: Expected a org.apache.hadoop.fs.PathOperationException to be thrown, but got the result: : true at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:499) at org.apache.hadoop.test.LambdaTestUtils.intercept(LambdaTestUtils.java:384) at org.apache.hadoop.hdfs.TestDistributedFileSystem.testCopyBetweenFsEqualPath(TestDistributedFileSystem.java:2105) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418) [INFO] [INFO] Results: [INFO] [ERROR] Failures: [ERROR] TestDistributedFileSystem.testCopyBetweenFsEqualPath:2105 Expected a org.apache.hadoop.fs.PathOperationException to be thrown, but got the result: : true [INFO] [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0 [INFO] {code} Can you apply the patch and run {{mvn test -Dtest=TestDistributedFileSystem#testCopyBetweenFsEqualPath}} > Copy command in FileUtil to throw an exception if the source and destination > is the same > ---------------------------------------------------------------------------------------- > > Key: HADOOP-16878 > URL: https://issues.apache.org/jira/browse/HADOOP-16878 > Project: Hadoop Common > Issue Type: Improvement > Affects Versions: 3.3.0 > Reporter: Gabor Bota > Assignee: Gabor Bota > Priority: Major > Attachments: hdfsTest.patch > > > We encountered an error during a test in our QE when the file destination and > source path were the same. This happened during an ADLS test, and there were > no meaningful error messages, so it was hard to find the root cause of the > failure. > The error we saw was that file size has changed during the copy operation. > The new file creation in the destination - which is the same as the source - > creates a file and sets the file length to zero. After this, getting the > source file will fail because the sile size changed during the operation. > I propose a solution to at least log in error level in the {{FileUtil}} if > the source and destination of the copy operation is the same, so debugging > issues like this will be easier in the future. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org