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

Konstantin Boudnik commented on BIGTOP-1299:
--------------------------------------------

Looks pretty good overall. I see some formatting issues left, like
{code}
-        assertValueExists(sh.getOut(), HTTPFS_SUCCESS);
+        sh.exec("curl -i -X PUT -T $DATA_DIR/$filename '$datanodeLocation' 
--header 'Content-Type:application/octet-stream'");
+
+       // check if the file was created
+        assertTrue("curl command to create a file failed when sending data to 
$datanodeLocation", sh.getRet() == 0);
+        sh.exec("hadoop fs -test -e $testHttpFsFolder/$filename");
+       assertTrue("a file $testHttpFsFolder/$filename does not exist", 
sh.getRet() == 0);
+
+       // check if we can read the content of this file
         sh.exec("curl -i -L 
'$HTTPFS_PREFIX$testHttpFsFolder/$filename?user.name=$USERNAME&op=OPEN'");
-        assertTrue("curl command to create a file failed", sh.getRet() == 0);
{code}
e.g. some lines have lesser spaces in the indent. Please fix those and the 
patch should be ready after.

> Better verification of status of commands in HttpFs
> ---------------------------------------------------
>
>                 Key: BIGTOP-1299
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-1299
>             Project: Bigtop
>          Issue Type: Improvement
>          Components: Tests
>    Affects Versions: 0.8.0
>            Reporter: Adam Kawa
>            Priority: Minor
>         Attachments: BIGTOP-1299.1.patch
>
>
> There are multiple fixes in this patch
> Recommended by [~cos] in [BIGTOP-1246].
> * the package name fixed.
> * unused imports removed
> * == removed when checking a boolean variable
> Additional fixes
> * checking the existence of a directory in HDFS using "hadoop fs -test -d" 
> (instead of hadoop fs -text -e)
> * adding a number of "hadoop fs" commands to check if HttpFs command really 
> did its work.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to