[ 
https://issues.apache.org/jira/browse/MSHARED-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15118059#comment-15118059
 ] 

Michael Osipov edited comment on MSHARED-448 at 1/27/16 1:27 PM:
-----------------------------------------------------------------

Confirming on Ubuntu 14.04 LTS:

{noformat}
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
2015-11-10T17:41:47+01:00)
Maven home: /opt/apache-maven-3.3.9
Java version: 1.8.0_66-internal, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-i386/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-24-generic", arch: "i386", family: "unix"
{noformat}

output:
{noformat}
testRecreation(org.apache.maven.archiver.MavenArchiverTest)  Time elapsed: 
0.036 sec  <<< FAILURE!
junit.framework.AssertionFailedError: expected:<1453843280000> but 
was:<1453843220000>
        at junit.framework.Assert.fail(Assert.java:50)
        at junit.framework.Assert.failNotEquals(Assert.java:287)
        at junit.framework.Assert.assertEquals(Assert.java:67)
        at junit.framework.Assert.assertEquals(Assert.java:134)
        at junit.framework.Assert.assertEquals(Assert.java:140)
        at 
org.apache.maven.archiver.MavenArchiverTest.testRecreation(MavenArchiverTest.java:250)


Results :

Failed tests:
  MavenArchiverTest.testRecreation:250 expected:<1453843280000> but 
was:<1453843220000>
{noformat}

It must be some change in Java 8 which causes this. All I can see is that as 
soon as Plexus Archiver creates a {{FileOutputStream}} {{mtime}} of that file 
is changed. I think there is absolutely nothing we can do but skip this test 
with Java 8. Maybe someone else has a better idea.

[Here|http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_08]
 is the POSIX reference for time update and a somewhat related [SO 
question|http://stackoverflow.com/q/5714489/696632].


was (Author: michael-o):
Confirming on Ubuntu 14.04 LTS:

{noformat}
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 
2015-11-10T17:41:47+01:00)
Maven home: /opt/apache-maven-3.3.9
Java version: 1.8.0_66-internal, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-i386/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-24-generic", arch: "i386", family: "unix"
{noformat}

output:
{noformat}
testRecreation(org.apache.maven.archiver.MavenArchiverTest)  Time elapsed: 
0.036 sec  <<< FAILURE!
junit.framework.AssertionFailedError: expected:<1453843280000> but 
was:<1453843220000>
        at junit.framework.Assert.fail(Assert.java:50)
        at junit.framework.Assert.failNotEquals(Assert.java:287)
        at junit.framework.Assert.assertEquals(Assert.java:67)
        at junit.framework.Assert.assertEquals(Assert.java:134)
        at junit.framework.Assert.assertEquals(Assert.java:140)
        at 
org.apache.maven.archiver.MavenArchiverTest.testRecreation(MavenArchiverTest.java:250)


Results :

Failed tests:
  MavenArchiverTest.testRecreation:250 expected:<1453843280000> but 
was:<1453843220000>
{noformat}

It must be some change in Java 8 which causes this. All I can see is that as 
soon as Plexus Archiver creates a {{FileOutputStream}} {{mtime}} of that file 
is changed. I think there is absolutely nothing we can do but skip this test 
with Java 8. Maybe someone else has a better idea.

[Here|http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_08]
 is the POSIX reference for time update.

> testRecreation failure with OpenJDK 8 on Linux
> ----------------------------------------------
>
>                 Key: MSHARED-448
>                 URL: https://issues.apache.org/jira/browse/MSHARED-448
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-archiver
>    Affects Versions: maven-archiver-3.0.0
>         Environment: OpenJDK 1.8.0_60 (Linux, amd64)
> Maven 3.3.3
>            Reporter: Mikolaj Izdebski
>
> testRecreation test of maven-archiver 3.0.0 fails with OpenJDK on Linux
> {code}
> testRecreation(org.apache.maven.archiver.MavenArchiverTest)  Time elapsed: 
> 0.026 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: expected:<1445257310000> but 
> was:<1445257250000>
>       at junit.framework.Assert.fail(Assert.java:50)
>       at junit.framework.Assert.failNotEquals(Assert.java:287)
>       at junit.framework.Assert.assertEquals(Assert.java:67)
>       at junit.framework.Assert.assertEquals(Assert.java:134)
>       at junit.framework.Assert.assertEquals(Assert.java:140)
>       at 
> org.apache.maven.archiver.MavenArchiverTest.testRecreation(MavenArchiverTest.java:248)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to