vinayakumarb commented on a change in pull request #2387:
URL: https://github.com/apache/hadoop/pull/2387#discussion_r507475468



##########
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/TestRawLocalFileSystemContract.java
##########
@@ -203,4 +203,27 @@ public void testPermission() throws Exception {
     }
   }
 
+  @Test
+  public void testMTimeAtime() throws IOException {
+    RawLocalFileSystem.setUseDeprecatedFileStatus(true);
+    try {
+      Path testDir = getTestBaseDir();
+      String testFilename = "testmtime";
+      Path path = new Path(testDir, testFilename);
+      Path file = new Path(path, "file");
+      fs.create(file);
+      long now = System.currentTimeMillis();
+      long mtime = (now % 1000 == 0) ? now + 1 : now;
+      long atime = (now % 1000 == 0) ? now + 2 : now;
+      fs.setTimes(file, mtime, atime);
+      FileStatus fileStatus = fs.getFileStatus(file);
+      if (!Shell.MAC) {
+        //HADOOP-17306 ; JDK-8177809 not fixed in MacOs
+        assertEquals(mtime, fileStatus.getModificationTime());

Review comment:
       Sure. Thanks for details @aajisaka 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to