[ 
https://issues.apache.org/jira/browse/HADOOP-11244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14188777#comment-14188777
 ] 

Noah Watkins commented on HADOOP-11244:
---------------------------------------

The way I'm reading the code for the test, it looks to me like it isn't 
actually testing what is intended.

I'm looking at the code here

  
https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/AbstractContractAppendTest.java#L108

During the test the path to the renamed file is created "Path renamed = new 
Path(testPath, "renamed");", but then that path is never created (ostensibly by 
renaming the file opened for writing). After that it is asserted that the 
renamed file exists.  "assertPathExists("renamed destination file does not 
exist", renamed);"

> The HCFS contract test testRenameFileBeingAppended doesn't do a rename
> ----------------------------------------------------------------------
>
>                 Key: HADOOP-11244
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11244
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Noah Watkins
>
> The test AbstractContractAppendTest::testRenameFileBeingAppended appears to 
> assert the behavior of renaming a file opened for writing. However, the 
> assertion "assertPathExists("renamed destination file does not exist", 
> renamed);" fails because it appears that the file "renamed" is never created 
> (ostensibly it should be the "target" file that has been renamed).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to