whbing commented on pull request #3970:
URL: https://github.com/apache/hadoop/pull/3970#issuecomment-1033786629
It might be better to add a test, e.g.
```java
...
fs.setOwner(src,"userA", "groupA");
fs.setTimes(src, new Random().nextLong(), new Random().nextLong());
String[] args = {"-p", "-update", src.toString(), dest.toString()};
DistCp distCp = new DistCp(conf, null);
assertEquals(DistCpConstants.SUCCESS, ToolRunner.run(conf, distCp,
args));
FileStatus srcStatus = fs.getFileStatus(src);
FileStatus destStatus = fs.getFileStatus(dest);
assertTrue(destStatus.getOwner().equals(srcStatus.getOwner()));
assertTrue(destStatus.getModificationTime() ==
srcStatus.getModificationTime());
```
--
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]