bilaharith commented on a change in pull request #1207: Hadoop 16479
URL: https://github.com/apache/hadoop/pull/1207#discussion_r311393415
##########
File path:
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemFileStatus.java
##########
@@ -122,4 +123,19 @@ public void testAbfsPathWithHost() throws IOException {
assertEquals(pathWithHost2.getName(), fileStatus2.getPath().getName());
}
-}
+ @Test
+ public void testLastModifiedTime() throws IOException {
+ AzureBlobFileSystem fs = this.getFileSystem();
+ Path testFilePath = new Path("childfile1.txt");
+ long createStartTime = System.currentTimeMillis();
+ fs.create(testFilePath);
+ long createEndTime = System.currentTimeMillis();
+ FileStatus fStat = fs.getFileStatus(testFilePath);
+ long lastModifiedTime = fStat.getModificationTime();
+ assertTrue((createStartTime / 1000) * 1000 - 1 < lastModifiedTime);
+ // Dividing and multiplying by 1000 to make last 3 digits 0.
+ // It is observed that modification time is returned with last 3
+ // digits 0 always.
+ assertTrue(createEndTime > lastModifiedTime);
Review comment:
Done
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]