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:
parent
12cb3456d7
commit
4e6348f346
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue