From 942ecbbc9876427051965ddd167df5cc1cc253e3 Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Fri, 16 Jun 2017 09:45:22 +0100 Subject: [PATCH] HADOOP-14486 TestSFTPFileSystem#testGetAccessTime test failure using openJDK 1.8.0. Contributed by Hongyuan Li. --- .../test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java | 1 + 1 file changed, 1 insertion(+) diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java index 3d57dabd86d..e8eedd949e0 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java @@ -315,6 +315,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); }