testReadFile unit test timebased comparisons fail
-------------------------------------------------

                 Key: MCHANGELOG-68
                 URL: http://jira.codehaus.org/browse/MCHANGELOG-68
             Project: Maven 2.x Changelog Plugin
          Issue Type: Bug
    Affects Versions: 2.2
         Environment: 2.0.7
            Reporter: John Allen


The unit tests in ChangeLogTest that test the changeset file for time 
comparisons such as:

{code}
        ChangeSet changeSet = (ChangeSet) changelogSets.getChangeSets().get( 0 
);


        Calendar cal = Calendar.getInstance(); // new cal with default TZ

        cal.set( 1977, 7, 6, 5, 30, 0); // expected date from min-changelog.xml

        cal.set( Calendar.MILLISECOND, 0);


        assertEquals( "Test changelog 1 set 1 date/time", 
cal.getTime().getTime(), changeSet.getDate().getTime() );
{code}

Fail on my UK GMT machine with trace:

{code}
junit.framework.AssertionFailedError: Test changelog 1 set 1 date/time 
expected:<239671800000> but was:<239686200000>
        at junit.framework.Assert.fail(Assert.java:47)
        at junit.framework.Assert.failNotEquals(Assert.java:282)
        at junit.framework.Assert.assertEquals(Assert.java:64)
        at junit.framework.Assert.assertEquals(Assert.java:136)
        at 
org.apache.maven.plugin.changelog.ChangeLogTest.testReadFile(ChangeLogTest.java:63)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at junit.framework.TestCase.runTest(TestCase.java:154)
        at junit.framework.TestCase.runBare(TestCase.java:127)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at 
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
        at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to