HADOOP-14486 TestSFTPFileSystem#testGetAccessTime test failure using openJDK 1.8.0.
Contributed by Hongyuan Li.
This commit is contained in:
parent
e855cc4ed4
commit
942ecbbc98
|
@ -315,6 +315,7 @@ public class TestSFTPFileSystem {
|
||||||
java.nio.file.Path path = (local).pathToFile(file).toPath();
|
java.nio.file.Path path = (local).pathToFile(file).toPath();
|
||||||
long accessTime1 = Files.readAttributes(path, BasicFileAttributes.class)
|
long accessTime1 = Files.readAttributes(path, BasicFileAttributes.class)
|
||||||
.lastAccessTime().toMillis();
|
.lastAccessTime().toMillis();
|
||||||
|
accessTime1 = (accessTime1 / 1000) * 1000;
|
||||||
long accessTime2 = sftpFs.getFileStatus(file).getAccessTime();
|
long accessTime2 = sftpFs.getFileStatus(file).getAccessTime();
|
||||||
assertEquals(accessTime1, accessTime2);
|
assertEquals(accessTime1, accessTime2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue