[ https://issues.apache.org/jira/browse/HADOOP-14486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16050973#comment-16050973 ]
Steve Loughran edited comment on HADOOP-14486 at 6/15/17 9:33 PM: ------------------------------------------------------------------ No, time, I've been away. I can assure you, we are all behind reviewing things. And, equally: all waiting for others to review our own work. Looking at the patch, I think I'd be happier with 1000 * (accessTime1 % 1000) It's integer division (hence the % operator) and avoids confusion about what the evaluateion of {{accessTime1 / 1000 * 1000 }} is. I misread at first as {{accessTime1 / (1000 * 1000)). *Update/Correction*. No, % is entirely the wrong operator. It'd have to be {{accessTime - (accessTime1 % 1000)}}, which isn't that good. Let's go with: {{(accessTime1 / 1000) * 1000}} with the braces to make it obvious, even to me was (Author: ste...@apache.org): No, time, I've been away. I can assure you, we are all behind reviewing things. And, equally: all waiting for others to review our own work. Looking at the patch, I think I'd be happier with 1000 * (accessTime1 % 1000) It's integer division (hence the % operator) and avoids confusion about what the evaluateion of {{accessTime1 / 1000 * 1000 }} is. I misread at first as {{accessTime1 / (1000 * 1000)). > TestSFTPFileSystem#testGetAccessTime test failure using openJDK 1.8.0 > ----------------------------------------------------------------------- > > Key: HADOOP-14486 > URL: https://issues.apache.org/jira/browse/HADOOP-14486 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Affects Versions: 3.0.0-alpha4 > Environment: Ubuntu 14.04 > x86, ppc64le > $ java -version > openjdk version "1.8.0_111" > OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-3~14.04.1-b14) > OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode) > Reporter: Sonia Garudi > Assignee: Hongyuan Li > Attachments: HADOOP-14486-001.patch > > > The TestSFTPFileSystem#testGetAccessTime test fails consistently with the > error below: > {code} > java.lang.AssertionError: expected:<1496496040072> but was:<1496496040000> > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.failNotEquals(Assert.java:743) > at org.junit.Assert.assertEquals(Assert.java:118) > at org.junit.Assert.assertEquals(Assert.java:555) > at org.junit.Assert.assertEquals(Assert.java:542) > at > org.apache.hadoop.fs.sftp.TestSFTPFileSystem.testGetAccessTime(TestSFTPFileSystem.java:319) > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org