steveloughran commented on a change in pull request #4036:
URL: https://github.com/apache/hadoop/pull/4036#discussion_r823134783
##########
File path:
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##########
@@ -726,7 +727,10 @@ public void testUnZip() throws IOException {
// check result:
assertTrue(new File(tmp, "foo").exists());
assertEquals(12, new File(tmp, "foo").length());
-
+ assertTrue(new File(tmp, "foo").canExecute());
Review comment:
can you add ext to the asserts for permissons, e.g
```java
assertTrue("file lacks execute permissions", new File(tmp,
"foo").canExecute());
```
imagine a yetus test run failed? what do you want in the test reports. a
line number or a message?
##########
File path:
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestFileUtil.java
##########
@@ -706,15 +706,16 @@ public void testCreateLocalTempFile() throws IOException {
public void testUnZip() throws IOException {
// make sa simple zip
final File simpleZip = new File(del, FILE);
- OutputStream os = new FileOutputStream(simpleZip);
- ZipOutputStream tos = new ZipOutputStream(os);
+ OutputStream os = new FileOutputStream(simpleZip);
+ ZipArchiveOutputStream tos = new ZipArchiveOutputStream(os);
Review comment:
if you move this to try with resources, the close will be automatic, but
I'm not worried about this, as its test code and it keeps the patch smaller
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]