HADOOP-14486 TestSFTPFileSystem#testGetAccessTime test failure using openJDK 1.8.0.

Contributed by Hongyuan Li.

(cherry picked from commit 942ecbbc98)
This commit is contained in:
Steve Loughran 2017-06-16 09:46:34 +01:00
parent 12cb3456d7
commit 4e6348f346
No known key found for this signature in database
GPG Key ID: 950CC3E032B79CA2
1 changed files with 1 additions and 0 deletions

View File

@ -316,6 +316,7 @@ public class TestSFTPFileSystem {
java.nio.file.Path path = (local).pathToFile(file).toPath();
long accessTime1 = Files.readAttributes(path, BasicFileAttributes.class)
.lastAccessTime().toMillis();
accessTime1 = (accessTime1 / 1000) * 1000;
long accessTime2 = sftpFs.getFileStatus(file).getAccessTime();
assertEquals(accessTime1, accessTime2);
}