Maven Changelog Plugin
  1. Maven Changelog Plugin
  2. MCHANGELOG-68

testReadFile unit test timebased comparisons fail

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.3
    • Labels:
      None
    • Environment:
      2.0.7
    • Number of attachments :
      0

      Description

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

              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() );
      

      Fail on my UK GMT machine with trace:

      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)
      
      

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Dennis Lundberg
              Reporter:
              John Allen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: