You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aa...@apache.org on 2018/09/25 07:04:01 UTC

hadoop git commit: HADOOP-15783. [JDK10] TestSFTPFileSystem.testGetModifyTime fails.

Repository: hadoop
Updated Branches:
  refs/heads/trunk 50bc7746d -> 93b0f540e


HADOOP-15783. [JDK10] TestSFTPFileSystem.testGetModifyTime fails.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/93b0f540
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/93b0f540
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/93b0f540

Branch: refs/heads/trunk
Commit: 93b0f540ed52f31c53fe4afc6d423e64c57c0af2
Parents: 50bc774
Author: Akira Ajisaka <aa...@apache.org>
Authored: Tue Sep 25 16:03:28 2018 +0900
Committer: Akira Ajisaka <aa...@apache.org>
Committed: Tue Sep 25 16:03:28 2018 +0900

----------------------------------------------------------------------
 .../test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java   | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/93b0f540/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp/TestSFTPFileSystem.java
----------------------------------------------------------------------
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 af48cb6..96f6fb9 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();
+    // SFTPFileSystem doesn't have milliseconds. Excluding it.
     accessTime1 = (accessTime1 / 1000) * 1000;
     long accessTime2 = sftpFs.getFileStatus(file).getAccessTime();
     assertEquals(accessTime1, accessTime2);
@@ -325,6 +326,8 @@ public class TestSFTPFileSystem {
     Path file = touch(localFs, name.getMethodName().toLowerCase() + "1");
     java.io.File localFile = ((LocalFileSystem) localFs).pathToFile(file);
     long modifyTime1 = localFile.lastModified();
+    // SFTPFileSystem doesn't have milliseconds. Excluding it.
+    modifyTime1 = (modifyTime1 / 1000) * 1000;
     long modifyTime2 = sftpFs.getFileStatus(file).getModificationTime();
     assertEquals(modifyTime1, modifyTime2);
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org