File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/sftp Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -315,6 +315,7 @@ public void testGetAccessTime() throws IOException {
315315 java .nio .file .Path path = (local ).pathToFile (file ).toPath ();
316316 long accessTime1 = Files .readAttributes (path , BasicFileAttributes .class )
317317 .lastAccessTime ().toMillis ();
318+ // SFTPFileSystem doesn't have milliseconds. Excluding it.
318319 accessTime1 = (accessTime1 / 1000 ) * 1000 ;
319320 long accessTime2 = sftpFs .getFileStatus (file ).getAccessTime ();
320321 assertEquals (accessTime1 , accessTime2 );
@@ -325,6 +326,8 @@ public void testGetModifyTime() throws IOException {
325326 Path file = touch (localFs , name .getMethodName ().toLowerCase () + "1" );
326327 java .io .File localFile = ((LocalFileSystem ) localFs ).pathToFile (file );
327328 long modifyTime1 = localFile .lastModified ();
329+ // SFTPFileSystem doesn't have milliseconds. Excluding it.
330+ modifyTime1 = (modifyTime1 / 1000 ) * 1000 ;
328331 long modifyTime2 = sftpFs .getFileStatus (file ).getModificationTime ();
329332 assertEquals (modifyTime1 , modifyTime2 );
330333 }
You can’t perform that action at this time.
0 commit comments